Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] linux 5.13 compat: bdevops->revalidate_disk() removed #12122

Merged
merged 1 commit into from
Jun 2, 2021
Merged

[backport] linux 5.13 compat: bdevops->revalidate_disk() removed #12122

merged 1 commit into from
Jun 2, 2021

Conversation

jonathonf
Copy link
Contributor

@jonathonf jonathonf commented May 25, 2021

Linux kernel commit 0f00b82e5413571ed225ddbccad6882d7ea60bc7 removes the
revalidate_disk() handler from struct block_device_operations. This
caused a regression, and this commit eliminates the call to it and the
assignment in the block_device_operations static handler assignment
code, when configure identifies that the kernel doesn't support that
API handler.

Reviewed-by: Colin Ian King colin.king@canonical.com
Reviewed-by: Brian Behlendorf behlendorf1@llnl.gov
Signed-off-by: Coleman Kane ckane@colemankane.org
Closes #11967
Closes #11977
(cherry picked from commit 48c7b0e)
Signed-off-by: Jonathon Fernyhough jonathon@m2x.dev

Motivation and Context

Description

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Linux kernel commit 0f00b82e5413571ed225ddbccad6882d7ea60bc7 removes the
revalidate_disk() handler from struct block_device_operations. This
caused a regression, and this commit eliminates the call to it and the
assignment in the block_device_operations static handler assignment
code, when configure identifies that the kernel doesn't support that
API handler.

Reviewed-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #11967
Closes #11977
(cherry picked from commit 48c7b0e)
Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
@jonathonf jonathonf changed the title linux 5.13 compat: bdevops->revalidate_disk() removed [backport] linux 5.13 compat: bdevops->revalidate_disk() removed May 25, 2021
@jwk404 jwk404 added the Status: Work in Progress Not yet ready for general review label May 25, 2021
@behlendorf behlendorf assigned tonyhutter and unassigned jwk404 May 26, 2021
@tonyhutter
Copy link
Contributor

Just for quick reference, the only thing ZFS does in revalidate_disk() is set the capacity:

zvol_revalidate_disk(struct gendisk *disk)
{
...
                set_capacity(zv->zv_zso->zvo_disk,
...
}

That's appears to be unneeded in newer kernels:
https://patchwork.kernel.org/project/linux-block/patch/20210308074550.422714-3-hch@lst.de/

So once the checkstyle error is fixed it should be good to go.

Copy link
Contributor

@tonyhutter tonyhutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. The checkstyle error is unrelated to this patch.

@jonathonf jonathonf marked this pull request as ready for review May 28, 2021 18:31
@tonyhutter tonyhutter merged commit 9dc9bb3 into openzfs:zfs-2.0.5-staging Jun 2, 2021
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jun 2, 2021
Linux kernel commit 0f00b82e5413571ed225ddbccad6882d7ea60bc7 removes the
revalidate_disk() handler from struct block_device_operations. This
caused a regression, and this commit eliminates the call to it and the
assignment in the block_device_operations static handler assignment
code, when configure identifies that the kernel doesn't support that
API handler.

Reviewed-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes openzfs#11967
Closes openzfs#11977
(cherry picked from commit 48c7b0e)
Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>

Co-authored-by: Coleman Kane <ckane@colemankane.org>
tonyhutter pushed a commit that referenced this pull request Jun 23, 2021
Linux kernel commit 0f00b82e5413571ed225ddbccad6882d7ea60bc7 removes the
revalidate_disk() handler from struct block_device_operations. This
caused a regression, and this commit eliminates the call to it and the
assignment in the block_device_operations static handler assignment
code, when configure identifies that the kernel doesn't support that
API handler.

Reviewed-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #11967
Closes #11977
(cherry picked from commit 48c7b0e)
Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>

Co-authored-by: Coleman Kane <ckane@colemankane.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Work in Progress Not yet ready for general review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants