btrfs: add regression test for clone ioctl
authorFilipe Manana <fdmanana@suse.com>
Mon, 15 Dec 2014 23:53:42 +0000 (10:53 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 15 Dec 2014 23:53:42 +0000 (10:53 +1100)
commit22fc64ea50e40ac342605018fbc9b9ffcc1977cf
tree61fac868d583d61aca2e3a70fd2b4019b0e9979e
parent0cfb617c51ae3fbc258e30e7760f57f58db1684d
btrfs: add regression test for clone ioctl

Regression test for a btrfs clone ioctl issue where races between
a clone operation and concurrent target file reads would result in
leaving stale data in the page cache. After the clone operation
finished, reading from the clone target file would return the old
and no longer valid data. This affected only buffered reads (i.e.
didn't affect direct IO reads).

This issue was fixed by the following linux kernel patch:

    Btrfs: ensure readers see new data after a clone operation
    (commit c125b8bff1d9f6c8c91ce4eb8bd5616058c7d510)

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/081 [new file with mode: 0755]
tests/btrfs/081.out [new file with mode: 0644]
tests/btrfs/group