mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix ASSERT in zfs_receive_one()
This commit fixes the following ASSERT in zfs_receive_one() when
receiving a send stream from a root dataset with the "-e" option:
$ sudo zfs snap source@snap
$ sudo zfs send source@snap | sudo zfs recv -e destination/recv
chopprefix > drrb->drr_toname
ASSERT at libzfs_sendrecv.c:3804:zfs_receive_one()
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8121
This commit is contained in:
@@ -3801,8 +3801,9 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
}
|
||||
|
||||
ASSERT(strstr(drrb->drr_toname, sendfs) == drrb->drr_toname);
|
||||
ASSERT(chopprefix > drrb->drr_toname);
|
||||
ASSERT(chopprefix <= drrb->drr_toname + strlen(drrb->drr_toname));
|
||||
ASSERT(chopprefix > drrb->drr_toname || strchr(sendfs, '/') == NULL);
|
||||
ASSERT(chopprefix <= drrb->drr_toname + strlen(drrb->drr_toname) ||
|
||||
strchr(sendfs, '/') == NULL);
|
||||
ASSERT(chopprefix[0] == '/' || chopprefix[0] == '@' ||
|
||||
chopprefix[0] == '\0');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user