generic: add test for fsync after cloning file range

Test that if we do a buffered write to a file, fsync it, clone a
range from another file into our file that overlaps the previously
written range, fsync the file again and then power fail, after we
mount again the filesystem, no file data was lost or corrupted.

This test is motivated by a bug found in btrfs, which is fixed by a
patch for the linux kernel titled:

  "Btrfs: fix file data corruption after cloning a range and fsync"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Filipe Manana
2018-07-12 01:38:11 +01:00
committed by Eryu Guan
parent 76b5a9d535
commit fcc3f3b9c3
3 changed files with 76 additions and 0 deletions
+1
View File
@@ -503,3 +503,4 @@
498 auto quick log
499 auto quick rw collapse zero
500 auto thin trim
501 auto quick clone log