generic: add test for fsync of directory after creating hard link

Test that if we create a new hard link for a file which was
previously fsync'ed, fsync a parent directory of the new hard link
and power fail, the parent directory exists after mounting the
filesystem again. The parent directory must be a new directory, not
yet persisted.

This test is motivated by a bug found in btrfs, where the fsync'ed
parent directory was lost after a power failure. The bug in btrfs is
fixed by a patch for the linux kernel titled:

 "Btrfs: sync log after logging new name"

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-06-11 19:24:35 +01:00
committed by Eryu Guan
parent 072ff808cf
commit 8e38c06860
3 changed files with 68 additions and 0 deletions
+1
View File
@@ -500,3 +500,4 @@
495 auto quick swap
496 auto quick swap
497 auto quick swap collapse
498 auto quick log