generic: test directory fsync after rename operation
authorFilipe Manana <fdmanana@suse.com>
Fri, 19 Feb 2016 01:15:17 +0000 (12:15 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 19 Feb 2016 01:15:17 +0000 (12:15 +1100)
commit72da52702a4b5bea1170aed791893487d0748566
tree6449110982b1fb030be01b837da8f9d95cba9165
parentb7441181b158170a7ecf2e7c4746eced020d77e3
generic: test directory fsync after rename operation

Test that if we move one file between directories, fsync the parent
directory of the old directory, power fail and remount the filesystem,
the file is not lost and it's located at the destination directory.

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

  "Btrfs: fix file loss on log replay after renaming a file and fsync"

Tested against ext3, ext4, xfs, f2fs and reiserfs.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/335 [new file with mode: 0755]
tests/generic/335.out [new file with mode: 0644]
tests/generic/group