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>
This commit is contained in:
Filipe Manana
2016-02-19 12:15:17 +11:00
committed by Dave Chinner
parent b7441181b1
commit 72da52702a
3 changed files with 116 additions and 0 deletions
+1
View File
@@ -337,3 +337,4 @@
332 auto quick clone
333 auto clone
334 auto clone
335 auto quick metadata