-
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 text for EINVAL in zfs_receive_one() #8977
Conversation
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Signed-off-by: Tom Caputi <tcaputi@datto.com>
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, | ||
"kernel modules must be upgraded to " | ||
"receive this stream.")); | ||
if (embedded && !raw) | ||
} else if (embedded && !raw) { |
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.
is this correct? isn't this supposed to be (embedded && raw)
?
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.
encrypted is not the same as raw. encrypted means that the resulting dataset from the receive was encrypted. Raw means that the encrypted dataset was sent using the raw send feature flag. It is confusing, and a guess at best, but this code should be more accurate than what is there now. I have proposed more general fixes for error reporting in cases like this, which I will hopefully get to some time soon.
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.
i also found this:
embedded data is incompatible with encryption and raw recv
unless i'm missing something we should theoretically handle EINVAL when both DMU_BACKUP_FEATURE_RAW
and DMU_BACKUP_FEATURE_EMBED_DATA
are set
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.
That should never happen. The flags are mutually exclusive on the send side. There are many places where the recv code can return EINVAL that will be misinterpreted. The idea of this patch is not to correct all of these cases, but simply to make this case (that a few people have hit) function as it was originally intended. We will address the broader problem of badly interpreted error codes in another pull request.
Codecov Report
@@ Coverage Diff @@
## master #8977 +/- ##
==========================================
- Coverage 78.74% 78.72% -0.02%
==========================================
Files 388 388
Lines 119972 119972
==========================================
- Hits 94466 94447 -19
- Misses 25506 25525 +19
Continue to review full report at Codecov.
|
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8977
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8977
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8977
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8977
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#8977
This small patch fixes the EINVAL case for zfs_receive_one(). A missing 'else' has been added to the two possible cases, which will ensure the intended error message is printed. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #8977
This small patch fixes the EINVAL case for zfs_receive_one(). A
missing 'else' has been added to the two possible cases, which
will ensure the intended error message is printed.
Signed-off-by: Tom Caputi tcaputi@datto.com
Types of changes
Checklist:
Signed-off-by
.