-
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
Fix error code on __zpl_ioctl_setflags() #11791
Conversation
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 for catching this slight difference in behavior! Can you just address the style warning and then this should be good. You can run make checkstyle
locally before updating the PR.
If you encounter any other unexpected discrepancies while testing with xfstests by all means let us know. Patches are even better! It's something we've wanted to add to our usual testing for a while now but haven't yet automated since it takes a little tweaking to run it against ZFS as I'm sure you know.
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability. This was detected by generic/545 test in the fstest suite. Signed-off-by: Luis Henriques <henrix@camandro.org>
Thanks for the review! I should have read more carefully the CONTRIBUTING.md before submitting my first fix. I've pushed a version with that style correction (TBH I assumed that change was making that
Yeah, it's tricky to run fstests against ZFS. I had to hack a few things and I'm sure there were a lot of tests skipped because some more hacks were missing. Is there a public tree with these tweaks available? (Obviously, I it would be nice to try to push these changes upstream.) |
Nothing current that I'm aware of. It would be ideal if whatever changes are needed to support ZFS could be pushed upstream to xfstests. We could maintain our own repo with the changes, but being able to use an unmodified upstream version would be great. That would make it easier for us to integrate in to our CI workflow. |
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability. This was detected by generic/545 test in the fstest suite. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Luis Henriques <henrix@camandro.org> Closes openzfs#11791
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability. This was detected by generic/545 test in the fstest suite. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Luis Henriques <henrix@camandro.org> Closes openzfs#11791
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability. This was detected by generic/545 test in the fstest suite. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Luis Henriques <henrix@camandro.org> Closes openzfs#11791
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability. This was detected by generic/545 test in the fstest suite. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Luis Henriques <henrix@camandro.org> Closes #11791
Other (all?) Linux filesystems seem to return -EPERM instead of -EACCESS when
trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE
capability. This was detected by generic/545 test in the fstest suite.
Signed-off-by: Luis Henriques henrix@camandro.org
Motivation and Context
It normalizes error code across other filesystems.
Description
As mentioned in the commit changelog: simply return -EPERM instead of -EACCESS when trying to set FS_APPEND_FL or FS_IMMUTABLE_FL without the CAP_LINUX_IMMUTABLE capability.
How Has This Been Tested?
Executed a (modified) fstest suite, specifically generic/545
Types of changes
Checklist:
Signed-off-by
.