]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/130: fix Invalid argument
authorAnand Jain <anand.jain@oracle.com>
Tue, 17 Apr 2018 14:55:37 +0000 (22:55 +0800)
committerEryu Guan <guaneryu@gmail.com>
Tue, 24 Apr 2018 09:48:44 +0000 (17:48 +0800)
commit7c8651be0a1e165e6a2f75bd4206026b31aa13f0
tree33a9563a79be8af793f43f1a9d8e316583ec8672
parentd3977ca35aaf93734490f71b28643e3f58ccb6a4
btrfs/130: fix Invalid argument

btrfs-progs patch[1] replaced read(2) write(2) with splice(2) and
caused the append-redirect to stop working.

Before:
 btrfs send /btrfs/ro_send > /dev/null
 At subvol /btrfs/ro_snap

 btrfs send /btrfs/ro_send >> /dev/null
 At subvol /btrfs/ro_snap

After:
 btrfs send /btrfs/ro_send > /dev/null
 At subvol /btrfs/ro_snap

 btrfs send /btrfs/ro_send >> /dev/null
 At subvol /btrfs/ro_snap
 ERROR: failed to read stream from kernel: Invalid argument

Further in the test case the line..
btrfs/130
  ::
 _run_btrfs_util_prog send $SCRATCH_MNT/ro_snap > /dev/null 2>&1

which intended to redirect send output to /dev/null, but ended up
append redirect to the $seqres.full file. And so this test case
failed as 'Invalid argument' for sometime now.

Still as append of a btrfs send output doesn't make sense, so fix
the fstests.

Also adds logs going into $seqres.full.

[1]
ba23855cdc8961bbaef1fcad4854d494cdb3afd3
 btrfs-progs: send: use splice syscall instead of read/write to transfer buffer

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/130