-
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
Fail invalid incremental recursive send gracefully #12533
Conversation
|
zfs send -R -i snap1 pool/ds@snap1 is an invalid invocation of zfs send because the incremental source and target snapshots are the same. We have an error message for this condition, but we don't make it there because of a failed assert while iterating through the dataset's snapshots. Check for NULL to avoid the assert so we can make it to the error message. Test this form of invalid send invocation in rsend tests. Fix the rsend_016_neg test while here: log_neg itself doesn't fail the test, and writing to /dev/null is not supported on all Linux kernels. Signed-off-by: Ryan Moeller <[email protected]>
|
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.
Out of curiosity, what Linux systems don't allow you to write to /dev/null? I thought that its behavior (discard all data written to it) was part of the POSIX spec.
@pcd1193182 for all the gory details you'll want to see this #11445 (comment) which links to the upstream kernel discussions. This started with the 5.10 kernel and basically boils down to our need to do the I/O from within the kernel using the |
Motivation and Context
Issue #11121
zfs send -R -i snap1 pool/ds@snap1 is an invalid invocation of zfs send
because the incremental source and target snapshots are the same. We
have an error message for this condition, but we don't make it there
because of a failed assert while iterating through the dataset's
snapshots.
Description
Check for NULL to avoid the assert so we can make it to the error
message.
Test this form of invalid send invocation in rsend tests. Fix the
rsend_016_neg test while here: log_neg itself doesn't fail the test,
and writing to /dev/null is not supported on all Linux kernels.
How Has This Been Tested?
zfs send -R -i snap1 pool/ds@snap1 > /dev/null
Added the invalid invocation to an rsend test.
Types of changes
Checklist:
Signed-off-by
.