generic: test fsync after succession of renames and unlink
authorFilipe Manana <fdmanana@suse.com>
Tue, 12 Feb 2019 18:08:20 +0000 (18:08 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sat, 16 Feb 2019 10:18:28 +0000 (18:18 +0800)
Test that after a combination of file renames, linking and creating
a new file with the old name of a renamed file, if we fsync the new
file, after a power failure we are able to mount the filesystem and
all file names correspond to the correct inodes.

This test is motivated by a bug found in btrfs, which is fixed by
applying the following two patches to the linux kernel:

 "[PATCH 1/2] Btrfs: fix fsync after succession of renames of different files"
 "[PATCH 2/2] Btrfs: fix fsync after succession of renames and unlink/rmdir"

The test passes on ext4, xfs and patched btrfs, however at least in
a 5.0-rc5 linux kernel, it fails on f2fs.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>

No differences found