-
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
Cross-platform acltype #10520
Cross-platform acltype #10520
Conversation
This is my intent, but I am surely missing this mark at least on FreeBSD. On Linux it was easy to set z_acl_type = OFF for NFSV4, but since there was no such property on FreeBSD yet, I had no such mechanism in place to do the same there. The VFS code is very similar in some places between FreeBSD and Linux, but very different in others, so it is not yet clear to me where to place checks for z_acl_type on FreeBSD. |
I should mention this is based on the work in #9709 |
Looking at how the mount options for ACLs are displayed on Linux, I’m not sure if they should match what is documented for ext4, as in I have left the mount options as |
We should leave them unchanged to avoid any user/kernel compatibility issues. Plus this really isn't user visible unless they're already bypassing the |
Codecov Report
@@ Coverage Diff @@
## master #10520 +/- ##
===========================================
- Coverage 79.65% 64.76% -14.89%
===========================================
Files 396 312 -84
Lines 125475 107453 -18022
===========================================
- Hits 99949 69596 -30353
- Misses 25526 37857 +12331
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@trasz could you take a look at this? I need some help figuring out where to check acltype on FreeBSD / how to skip ACL checks if not nfsv4. |
Assuming I understand the question correctly, and the code works the way it used to, there's nothing to skip: in FreeBSD it's the filesystem that checks permissions, not VFS, and zfs_zaccess() only looks at NFSv4 ACLs. Regarding ACL access (setting and retrieval), zfs_freebsd_setacl() and zfs_freebsd_getacl() already check the ACL type. |
@trasz Thanks for helping me wrap my head around this. To be clear, I'm referring to Assuming we're on the same page, I can see how we could ignore the property if there isn't an existing ACL, though it might be useful to force aclmode to discard. But if there was an NFSv4 style ACL and the property changes to off (or posix), how can we ignore the ACL then? |
I see this is still in "draft" stage, but should this be added to the OpenZFS 2.0 project list? https://github.com/openzfs/zfs/projects/25 |
Let's make sure that we're modifying results of zfs_pathconf() appropriately based on ACL branding. This move us closer to just having both ACL types supported on FreeBSD. |
|
@pbhenson would you mind reviewing this PR please? It incorporates parts of your work to bring NFSv4 ACLs to Linux, though the intent here is only to extend the acltype property for use on FreeBSD for now. |
Sure; I can't say too much about the FreeBSD internals :), but the general changes look fine to me. I can't believe it's already been like 4 months since I worked on this :(, my day job is at a university so it's been pretty crazy with the remote learning, and budget wise I've been a bit more focused on the paid side gigs . Once you get this merged I'll have to get back to it; it's all done in my head ;). |
|
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhandled style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Signed-off-by: Ryan Moeller <[email protected]>
|
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10520
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes openzfs#10520
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes openzfs#10520
Motivation and Context
The acltype property is currently hidden on FreeBSD and does not
reflect the NFSv4 style ZFS ACLs used on the platform. This makes it
difficult to observe that a pool imported from FreeBSD on Linux has a
different type of ACL that is being ignored, and vice versa.
Description
Add an nfsv4 acltype and expose the property on FreeBSD.
Setting acltype to an unhandled style is treated the same as setting
it to off. The ACLs will not be removed, but they will be ignored.
How Has This Been Tested?
Internal CI with a suite of NFSv4 ACL tests pass. Porting a tests suite to ZTS is still a work in progress.
Types of changes
Checklist:
Signed-off-by
.