Open
Conversation
added 2 commits
December 7, 2016 14:16
Starting with Linux 4.9-rc1 the {get,set,remove}xattr inode
operations have been removed, and filesystems are required to use
xattr handlers instead. There's some partially implemented xattr
handlers commented out in aufs already. Finish those handlers and
convert aufs over to use them.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Starting with Linux 4.9-rc1 the rename2 inode operation has replaced the rename op, so filesystem rename implementations require an extra flags argument. Add the argument to fix the FTBFS with Linux 4.9, but since aufs doesn't support any of the flags return an error if it is non-zero. Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Owner
|
Hello Seth,
Seth Forshee:
Two fixes for FTBFS issues with Linux 4.9.
Thanx for the patch.
But I already started supporting linux-4.9. Here are the commits for
4.9-rc1. See the attached tarball.
0001-aufs-standalone-for-v4.9-rc1-export-d_exchange.patch
0002-aufs-for-v4.9-rc1-support-new-rename-flags-1-tiny-re.patch
0003-aufs-for-v4.9-rc1-support-new-rename-flags-2-tiny-re.patch
0004-aufs-for-v4.9-rc1-support-new-rename-flags-3-tiny-re.patch
0005-aufs-for-v4.9-rc1-support-new-rename-flags-4-tiny-ne.patch
0006-aufs-for-v4.9-rc1-support-new-rename-flags-5-core.patch
0009-aufs-for-v4.9-rc1-support-new-xattr-scheme.patch
0012-aufs-for-v4.9-rc1-support-setattr_prepare.patch
0013-aufs-for-v4.9-rc1-support-vfs_get_link.patch
0014-aufs-for-v4.9-rc1-tiny-comment-about-posix_acl_updat.patch
Mostly they are identical to yours. One thing shining is how to
support removexattr. Your patch explicitly tries calling
aufs_removexattr(), while mine is setting xattr. It is just because
removexattr() calls handler->set() and my approach simply follows it.
If you have any opinion about that, please let me know.
Anyway thank you for the patch.
I will release mine when I have enough time to support and test v4.9. It
may be next year though.
J. R. Okajima
|
Author
|
I don't see a tarball. Did you forget to attach it? |
Owner
|
Seth Forshee:
I don't see a tarball. Did you forget to attach it?
I did.
Hmm, github seemed to eat the attachment. I cannot see it via
#4 either.
Here again with a different attaching scheme.
If it doesn't work either, please send me (sfjro at users dot sf dot
net) your pernsonal mail address.
J. R. Okajima
|
Author
|
Your changes are obviously more complete, especially in supporting the rename flags. I only made a minimal effort to fix the build error. I'd personally be a little hesitant to use vfs_setxattr() instead of vfs_removexattr() on remove because the call a different set of security hooks. However it looks like userspace can call setxattr(2) that way to remove xattrs, so I guess it's probably okay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes for FTBFS issues with Linux 4.9.
The first problem is that the {get,set,remove}xattr inode operations have been remove, and filesystems must now use xattr handlers. There's already a partial implementation to use xattr handlers commented out in the source, so that implementation is completed and used instead of the unsupported callbacks.
The second issue is that the rename inode operation was replaced by the rename2 op, so aufs_rename needs an extra "flags" argument. Since aufs doesn't support the operations specified by the flags yet, it should return an error if the flags are non-zero.