diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2016-11-15 17:16:27 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-23 11:07:05 +0100 |
commit | f9a13d867b294723553a4c2299f68584c171b7e4 (patch) | |
tree | 42e1a60e54eae5d07d3deaa306d43ea77cfe0fe3 | |
parent | a2d91697c153ceac8ee7fc77121c873882246324 (diff) |
btrfs-progs: send: fix failure of fstests btrfs/038
The following patch was imperfect, so xfstests btrfs/038 was failed.
6d4fb3d btrfs-progs: send: fix handling of multiple snapshots (-p option)
[before]
| # ./check btrfs/038
| FSTYP -- btrfs
| PLATFORM -- Linux/x86_64 luna 4.9.0-rc5
| MKFS_OPTIONS -- /dev/sdb3
| MOUNT_OPTIONS -- /dev/sdb3 /test6
|
| btrfs/038 1s ... [failed, exit status 1] - output mismatch (see /For_RT/xfstests2/results//btrfs/038.out.bad)
| --- tests/btrfs/038.out 2015-08-04 16:09:38.000000000 +0900
| +++ /For_RT/xfstests2/results//btrfs/038.out.bad 2016-11-15 13:39:48.589435290 +0900
| @@ -7,3 +7,5 @@
| XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
| wrote 10000/10000 bytes at offset 300000
| XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
| +failed: '/usr/local/bin/btrfs send -p /test6/mysnap1 -c /test6/clones_snap /test6/mysnap2 -f /tmp/tmp.aLpvAC7lsx/2.snap'
| +(see /For_RT/xfstests2/results//btrfs/038.full for details)
| ...
| (Run 'diff -u tests/btrfs/038.out /For_RT/xfstests2/results//btrfs/038.out.bad' to see the entire diff)
| Ran: btrfs/038
| Failures: btrfs/038
[after]
| # ./check btrfs/038
| FSTYP -- btrfs
| PLATFORM -- Linux/x86_64 luna 4.9.0-rc5
| MKFS_OPTIONS -- /dev/sdb3
| MOUNT_OPTIONS -- /dev/sdb3 /test6
|
| btrfs/038 1s ... 1s
| Ran: btrfs/038
| Passed all 1 tests
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
[ Verified that this fixes both btrfs/038 and btrfs/117 ]
Tested-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds-send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-send.c b/cmds-send.c index 7aa4b36d..1ca4b8e4 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -686,7 +686,7 @@ int cmd_send(int argc, char **argv) goto out; } - if (!full_send && root_id) { + if (!full_send && !snapshot_parent) { ret = set_root_info(&send, subvol, &root_id); if (ret < 0) goto out; @@ -713,7 +713,7 @@ int cmd_send(int argc, char **argv) if (ret < 0) goto out; - if (!full_send && root_id) { + if (!full_send && !snapshot_parent) { /* done with this subvol, so add it to the clone sources */ ret = add_clone_source(&send, root_id); if (ret < 0) { |