summaryrefslogtreecommitdiff
path: root/cmds-send.c
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2016-03-24 16:47:28 +0900
committerDavid Sterba <dsterba@suse.com>2016-03-30 16:26:13 +0200
commita26044607704ce1be732d1256ffc35c31ebce147 (patch)
treedc3df664bdae0dd1d8ddf50ae43e6063a01ce94f /cmds-send.c
parentd7477bcd0b714a984f83b78aa19a9785bf3c8039 (diff)
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>
Diffstat (limited to 'cmds-send.c')
-rw-r--r--cmds-send.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmds-send.c b/cmds-send.c
index bbe16d84..bdf1c977 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -673,15 +673,16 @@ int cmd_send(int argc, char **argv)
if (ret < 0)
goto out;
- /* done with this subvol, so add it to the clone sources */
- ret = add_clone_source(&send, root_id);
- if (ret < 0) {
- error("not enough memory");
- goto out;
+ if (!full_send) {
+ /* done with this subvol, so add it to the clone sources */
+ ret = add_clone_source(&send, root_id);
+ if (ret < 0) {
+ error("not enough memory");
+ goto out;
+ }
}
parent_root_id = 0;
- full_send = 0;
}
ret = 0;