-
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
BRT EOPNOTSUPP more speaking return value #15097
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.
This is more accurate, and it looks to me like the latest coreutils
will handle EOPNOTSUPP
correctly when it bubbles all the way up. That said, the copy_file_range()
man page doesn't mention EOPNOTSUPP
as a possible errno
so I'd rather not change this until we really understand the consequences. At a minimum I see this change breaks the error handling here for FreeBSD which is a problem.
return EOPNOTSUPP if the storage pool don't support block cloning. Signed-off-by: Kay Pedersen <mail@mkwg.de>
2fdca62
to
facf8da
Compare
@behlendorf yes I saw that, I was a little fast when writing this PR. I will go and check more about this, when changing the return values. I saw one or two more checks, where we should change the return values to a more speaking value. So this should be put on hold for now until I checked everything. First, this explicit return value wouldn't bubble up, in the BSD code this check happens before EDIT: Also wanna check this here again: EXDEV BSD Maybe it could miss some errors and just do a generic copy, which shouldn't be done on specific errors. |
I'm softly ok with this as I think its the right return for Regarding Reading code to check all this has caused me to notice a possible bug on Linux 4.15-5.2. It looks like only |
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 the quick revision with the FreeBSD fix. I think we're okay with integrating this now after you've wrapped up any additional testing.
So checked the code, there are still a lot of
this is fine as well. On all if this cases we can fallback to a genric old style copy on BSD and than the return value would never be I'm finished my tests and we can merge this into master if you like. |
@oromenahar thanks, I'll go ahead and merge this. |
Return the more descriptive EOPNOTSUPP instead of EXDEV when the storage pool doesn't support block cloning. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Kay Pedersen <mail@mkwg.de> Closes openzfs#15097
Return the more descriptive EOPNOTSUPP instead of EXDEV when the storage pool doesn't support block cloning. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Kay Pedersen <mail@mkwg.de> Closes #15097
Return the more descriptive EOPNOTSUPP instead of EXDEV when the storage pool doesn't support block cloning. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Kay Pedersen <mail@mkwg.de> Closes openzfs#15097
return EOPNOTSUPP if the storage pool don't support block cloning.
Motivation and Context
To improve readability and let other programs know what the real error is.
Description
Just changed the return value, if the storage pool don't support BRT.
How Has This Been Tested?
Tested if it still compiles on rocky linux 9.
Tests and docs maybe missing, will check this later.
Types of changes
Checklist:
Signed-off-by
.