mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 17:56:51 +00:00
btrfs-progs: send: fix handling of multiple snapshots
We cannot send multiple snapshots at once. [before fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 ERROR: parent determination failed for 0 # [after fix] # btrfs send ./snap[12] > snap12.data At subvol ./snap1 At subvol ./snap2 # Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d7477bcd0b
commit
a260446077
13
cmds-send.c
13
cmds-send.c
@ -673,15 +673,16 @@ int cmd_send(int argc, char **argv)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* done with this subvol, so add it to the clone sources */
|
if (!full_send) {
|
||||||
ret = add_clone_source(&send, root_id);
|
/* done with this subvol, so add it to the clone sources */
|
||||||
if (ret < 0) {
|
ret = add_clone_source(&send, root_id);
|
||||||
error("not enough memory");
|
if (ret < 0) {
|
||||||
goto out;
|
error("not enough memory");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parent_root_id = 0;
|
parent_root_id = 0;
|
||||||
full_send = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user