-
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
send_iterate_snap : doall send without fromsnap #11608
Conversation
doall send without fromsnap were working properly on FreeBSD12. It's not working on FreeBSD13 with OpenZFS.
This is my first contribution. It is not perfect at all (sorry for that). I hope this contribution won't be the last one, and I will do better next time (i was not aware of the checklist before posting this PR) |
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, I'm sure this regressed since we didn't have a test case for it. As part of this change can you also add a simple one to the tests/zfs-tests/tests/functional/rsend/
directory and reference it from the tests/runfiles/common.run
file.
nit: please also address the make checkstyle
warnings about the comment style.
cc: @problame can you also take a look at this.
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
I added a review comment asking for more assertions to be done in the the .ksh test. zrepl only uses Regardless, at a glance, the fix seems reasonable. |
Patch pushed. I hope tests are going to work 🤞 I think that it may be interesting to allow users to be able to launch |
It seems that I have still a lot to learn 👶 |
I'm kind of stuck here. @behlendorf @problame : Your previous feedbacks were very helpful :) I've tried to copy the "badsend" example but something is still going wrong. I didn't find a clue in the logs of the automatic checks to correct my patch. Thank you in advance |
Co-authored-by: Brian Behlendorf <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
Signed-off-by: Cedric Maunoury <[email protected]>
/tests-functional-ubuntu (18.04)/
Everything seems fine on send_doall... I don't know why the functional tests have been cancelled... |
zfs-tests-functional / tests-functional-ubuntu (20.04) (pull_request) Cancelled after 360m — tests-functional-ubuntu (20.04) We have never been that close 👍 |
Do you think that my changes make ZFS slower ? |
No I don't think so. But we do seem to have bumped in to the 6 hour test limit for GitHub actions. It's not entirely clear why this test run took longer than usual, but I don't think it needs to hold up this PR. |
The behavior of a NULL fromsnap was inadvertently changed for a doall send when the send/recv logic in libzfs was updated. Restore the previous behavior by correcting send_iterate_snap() to include all the snapshots in the nvlist for this case. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Cedric Maunoury <[email protected]> Closes #11608
The behavior of a NULL fromsnap was inadvertently changed for a doall send when the send/recv logic in libzfs was updated. Restore the previous behavior by correcting send_iterate_snap() to include all the snapshots in the nvlist for this case. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Cedric Maunoury <[email protected]> Closes openzfs#11608
The behavior of a NULL fromsnap was inadvertently changed for a doall send when the send/recv logic in libzfs was updated. Restore the previous behavior by correcting send_iterate_snap() to include all the snapshots in the nvlist for this case. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Cedric Maunoury <[email protected]> Closes openzfs#11608
doall send without fromsnap were working properly on FreeBSD12. It's not working on FreeBSD13 with OpenZFS.
Motivation and Context
My tool ZFSync (https://github.com/cedricmaunoury/zfsync) is not working on FreeBSD 13 (with OpenZFS because of changes made on libzfs_sendrecv.c, especially on function send_iterate_snap.
Description
send_iterate_snap function is used to create a nvlist with all the snapshots that will be stored in the stream. If you want to send a full stream with all the snapshots of a dataset without its children (so replicate=false), the nvlist built is broken (only the last snapshot appears) which make the recv function fail with an ASSERT (0 == nvlist_lookup_nvlist(lookup, snapname, &snapprops_nvlist)
How Has This Been Tested?
On a FreeBSD13 server with the sources, I applied this patch and then rebuild the ZFS library
root@freebsd13_BETA2:/usr/src/cddl/lib/libzfs # make
root@freebsd13_BETA2:/usr/src/cddl/lib/libzfs # make install
root@freebsd13_BETA2:/usr/src/cddl/lib/libzfs
OS : FreeBSD 13 BETA 2
This patch is here to handle a "race condition" wich is not available from zfs client
Types of changes
Checklist:
Signed-off-by
.