Re: [PATCH] btrfs-progs: send: fix failure of xfstests btrfs/038

2016-11-18 Thread David Sterba
On Thu, Nov 17, 2016 at 11:24:41AM -0800, Omar Sandoval wrote:
> On Tue, Nov 15, 2016 at 05:16:27PM +0900, Tsutomu Itoh wrote:
> > 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.0 +0900
> > | +++ /For_RT/xfstests2/results//btrfs/038.out.bad2016-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 1/1 bytes at offset 30
> > |  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 
> 
> Verified that this fixes both btrfs/038 and btrfs/117.
> 
> Tested-by: Omar Sandoval 

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] btrfs-progs: send: fix failure of xfstests btrfs/038

2016-11-17 Thread Omar Sandoval
On Tue, Nov 15, 2016 at 05:16:27PM +0900, Tsutomu Itoh wrote:
> 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.0 +0900
> | +++ /For_RT/xfstests2/results//btrfs/038.out.bad2016-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 1/1 bytes at offset 30
> |  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 

Verified that this fixes both btrfs/038 and btrfs/117.

Tested-by: Omar Sandoval 

-- 
Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] btrfs-progs: send: fix failure of xfstests btrfs/038

2016-11-15 Thread Tsutomu Itoh
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.0 +0900
| +++ /For_RT/xfstests2/results//btrfs/038.out.bad2016-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 1/1 bytes at offset 30
|  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 
---
 cmds-send.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmds-send.c b/cmds-send.c
index 7aa4b36..1ca4b8e 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(, subvol, _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(, root_id);
if (ret < 0) {
-- 
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html