-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 6.2 compat: set_acl arg2 is "struct dentry *" and no longer "struct inode *" #14415
Conversation
I tested
However, I still cannot set the ACL under 6.2 after these changes, so there must be some more implementation(s) that's missing. |
@ckane If you already see the issue, I'll wait for more input before replicating what you've done on my end... |
ec35b75
to
7443949
Compare
7443949
to
ed0901d
Compare
The latest commit appears to fix the minimal I'll continue to use it and see it any other issues crop up... |
Thanks for the report! I wonder if there was also a bug upstream in rc4 that got fixed in rc5, related to those API changes |
@behlendorf I think this one is ready for your review |
ed0901d
to
7a64db5
Compare
@satmandu - can you re-try with the latest version of this patch? Earlier I had accidentally included some stylistic modifications to |
The latest version appears to work just fine:
|
FYI the packages I built to test this PR on my Ubuntu 22.10 system are here: https://launchpad.net/~satadru-umich/+archive/ubuntu/zfs-experimental/ |
8036360
to
0167eb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for sorting this out. Hopefully these interfaces won't change again, but at least since the code is now using ZFS_LINUX_REQUIRE_API
in the check we'll detect it immediately if they do.
0167eb0
to
ae4eb5c
Compare
Linux 6.2 changes the second argument of the set_acl operation to be a "struct dentry *" rather than a "struct inode *". The inode* parameter is still available as dentry->d_inode, so adjust the call to the _impl function call to dereference and pass that pointer to it. Also document that the get_acl -> get_inode_acl member name change from commit 884a693 was an API change also introduced in Linux 6.2. Signed-off-by: Coleman Kane <ckane@colemankane.org>
ae4eb5c
to
1cff3de
Compare
Linux 6.2 changes the second argument of the set_acl operation to be a "struct dentry *" rather than a "struct inode *". The inode* parameter is still available as dentry->d_inode, so adjust the call to the _impl function call to dereference and pass that pointer to it. Also document that the get_acl -> get_inode_acl member name change from commit 884a693 was an API change also introduced in Linux 6.2. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#14415
Adding a note here that I also confirmed that on 6.2rc4 |
Linux 6.2 changes the second argument of the set_acl operation to be a "struct dentry *" rather than a "struct inode *". The inode* parameter is still available as dentry->d_inode, so adjust the call to the _impl function call to dereference and pass that pointer to it. Also document that the get_acl -> get_inode_acl member name change from commit 884a693 was an API change also introduced in Linux 6.2. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#14415
Linux 6.2 changes the second argument of the set_acl operation to be a "struct dentry *" rather than a "struct inode *". The inode* parameter is still available as dentry->d_inode, so adjust the call to the _impl function call to dereference and pass that pointer to it. Also document that the get_acl -> get_inode_acl member name change from commit 884a693 was an API change also introduced in Linux 6.2. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#14415
Motivation and Context
As of (at least) Linux 6.2rc4, the ZFS kernel module is no longer compiling the
set_acl
implementation as all of theHAVE_SET_ACL
and related tests are failing inconfigure
.Results in the following:
Description
Linux 6.2 changes the second argument of the set_acl operation to be a "struct dentry *" rather than a "struct inode ". The inode parameter is still available as dentry->d_inode, so adjust the call to the _impl function call to dereference and pass that pointer to it.
Related to: #14403
How Has This Been Tested?
Testing on my machine, and it doesn't break. However, I still experience the failure when attempting to run
setfacl
on my system. However, I have not really made use of ACLs so I am putting together the PR to discuss the issue and diagnose further, tracking source code commits.Need to also run the ZFS test suite and ensure that
tests/zfs-tests/tests/functional/acl/posix
yield a PASS, which I suspect to not be the case presently.Types of changes
Checklist:
Signed-off-by
.