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>
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;