-
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
ACL operations result in “Invalid argument” on Linux 4.5 #4537
Comments
@fuzzykiller an ACL regression accidentally made it in to the release branch and has been fixed in master. We'll get the fix in to the next point release. If you need the fix now you can cherry pick the following patch, please let us know if it resolves the issue as expected. 98f0369 Fix ZPL miswrite of default POSIX ACL |
Thanks for the quick reply! I’m not sure this is the problem I’m facing. My ACLs were set months ago. Wouldn’t that mean they were written correctly? I’ll try anyway, of course. |
@behlendorf I'm not very experienced with ACLs, so I might be missing something important, but that commit doesn't seem to make any difference for me. On any existing or newly created dataset with Edit: Just made a test with a freshly created pool, but the results are still the same. For the record, here are the SPL/ZFS module versions as well (I'm also using the default I'll be curious if @fuzzykiller reaches different results. |
@behlendorf Nope, doesn’t work. I created a fresh VM with Arch Linux and tried a variety of things, including a master build (same versions as @kerberizer ), same results. I then upgraded to Linux 4.5.1, once again using a master ZFS/SPL build (218/49, as above). However, results didn’t change: It still doesn’t work. Unfortunately, I have no experience whatsoever with kernel debugging. But seeing how the bug is easily reproduced on an Arch install, you should be able to reproduce it, too. |
The patches do not seem to work for me either. I'm on gentoo x86_64 with linux 4.5.1, spl, zfs and zfs-kmod built from master. |
@kerberizer sorry, I answered this without looking as closely as I should have. This is definitely a different issue which needs to be investigated and it sounds like it's specific to 4.5 kernels. Can someone verify this doesn't occur with 4.4 and earlier kernels. |
@behlendorf acls work as expected here (zol 0.6.5.6, 4.4 kernel) |
@behlendorf It was the logical thing to assume: I had myself expected that regression to be the culprit too. Anyway, I can also confirm that the problem is solved by downgrading to Linux 4.4.x.
The ACLs here work as expected. In particular, I'd be very curious to see what the actual problem is. I even tried to look through that 4.5 compat change in 4967a3e, but my knowledge unfortunately was too inadequate to notice anything amiss on casual observation. In any case, I'd be glad to help with any testing that might be needed. |
@fuzzykiller @kerberizer |
@tuxoko Thanks! All tests that I've done earlier now proceed as expected on 4.5. It'll be interesting to see what the other people will find as they seem to use the ACLs more extensively than I do. |
@tuxoko It works. 😁 |
Works for me too... |
Linux 4.5 added member "name" to xattr_handler. xattr_handler which matches to whole name rather than prefix should use "name" instead of "prefix". Otherwise, kernel will return with EINVAL when it tries to resolve handlers. Also, we remove the strcmp checks when xattr_handler has name, because xattr_resolve_name will do the check for us. Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4549 Closes openzfs#4537
Linux 4.5 added member "name" to xattr_handler. xattr_handler which matches to whole name rather than prefix should use "name" instead of "prefix". Otherwise, kernel will return with EINVAL when it tries to resolve handlers. Also, we remove the strcmp checks when xattr_handler has name, because xattr_resolve_name will do the check for us. Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4549 Closes openzfs#4537
I’m running ZFS on Linux on my Arch machine. After upgrading to Kernel 4.5, I can no longer access ACLs:
setfacl
similarly fails. This happens both on version 0.6.5.5 (gbb0eec6) and 0.6.5.6 (g5079f5b). I’m running the Arch stock kernel 4.5.0-1 x86_64. I haveacltype
set toposixacl
.The strange thing is, the ACLs are still applied (by the kernel?). I have a directory with default ACLs set so that new files are world-readable. It still works:
(I also included a regular directory for comparison.)
On other filesystems like ext4, ACLs work as expected. There may have been some API change.
If you need additional information, please don’t hesitate to ask!
The text was updated successfully, but these errors were encountered: