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

Linux 4.9 compat #5301

Closed
wants to merge 3 commits into from
Closed

Conversation

behlendorf
Copy link
Contributor

Changes required to update ZFS to be compatible with the unreleased 4.9
kernel. These changes have been compile tested but the ZFS Test Suite
has not been run on a 4.9-rc1+ kernel.

Linux 4.9 compat: iops->*xattr removed
Linux 4.9 compat: inode_change_ok() renamed setattr_prepare()
Linux 4.9 compat: rename2() -> rename()

The iops->rename() callback has been replaced by iops->rename2()
which was introduced in an earlier kernel release.  Until such
time as we support the additional flags it's safe to simply
return -EINVAL when any flags are passed.

Signed-off-by: Brian Behlendorf <[email protected]>
In torvalds/linux@31051c8 the inode_change_ok() function was
renamed setattr_prepare() and updated to take a dentry ratheri
than an inode.  Update the code to call the setattr_prepare()
and add a wrapper function which call inode_change_ok() for
older kernels.

Signed-off-by: Brian Behlendorf <[email protected]>
Commit torvalds/linux@6c6ef9f removes the getxattr, setxattr, and
removexattr callbacks.  All filesystems which support xattrs are
required to have registered them with sb->s_xattr.  The ZFS code
made this change already so the only required change is to not
register the callback in the inode_operations structure.

Signed-off-by: Brian Behlendorf <[email protected]>
Requires-spl: refs/pull/580/head
@mention-bot
Copy link

@behlendorf, thanks for your PR! By analyzing the history of the files in this pull request, we identified @maxximino, @tuxoko and @dechamps to be potential reviewers.

@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Oct 19, 2016
@tuxoko
Copy link
Contributor

tuxoko commented Oct 19, 2016

@behlendorf Uhh, I was doing this today...

@behlendorf
Copy link
Contributor Author

That's OK, we'll take the best bits of each implementation. Plus it'll make it easier to review.

@tuxoko tuxoko mentioned this pull request Oct 19, 2016
@behlendorf
Copy link
Contributor Author

Closing is favor of #5307

@behlendorf behlendorf closed this Oct 19, 2016
@behlendorf behlendorf deleted the linux-4.9-compat branch May 1, 2017 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants