mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix incremental receive silently failing for recursive sends
The problem occurs because dmu_recv_begin pulls in the payload and next header from the input stream in order to use the contents of the begin record's nvlist. However, the change to do that before the other checks in dmu_recv_begin occur caused a regression where an empty send stream in a recursive send could have its END record consumed by this, which broke the logic of recv_skip. A test is also included to protect against this case in the future. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #12661 Closes #14568
This commit is contained in:
@@ -563,7 +563,7 @@ test_recv_new(const char *dataset, int fd)
|
||||
fnvlist_add_uint64(optional, "action_handle", *action_handle);
|
||||
#endif
|
||||
IOC_INPUT_TEST(ZFS_IOC_RECV_NEW, dataset, required, optional,
|
||||
ZFS_ERR_STREAM_TRUNCATED);
|
||||
ENOTSUP);
|
||||
|
||||
nvlist_free(props);
|
||||
nvlist_free(optional);
|
||||
|
||||
Reference in New Issue
Block a user