Files
apfstests/tests/generic/502.out
T
Filipe Manana b19c447027 generic: add test for fsync after renaming hard links of same file
Test that if we have a file with 2 (or more) hard links in the same
parent directory, rename of the hard links, rename one of the other
hard links to the old name of the hard link we renamed before,
create a new file in the same parent directory with the old name of
second hard link we renamed, fsync fsync this new file and power
fail, we will be able to mount again the filesystem and the new file
and all hard links exist.

This test is motivated by a bug found in btrfs, where mounting the
filesystem after the power failure resulted in failure with an errno
value of EEXIST, which is fixed by a patch for the linux kernel
titled:

  "Btrfs: fix mount failure after fsync due to hard link recreation"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-07-22 01:44:30 +08:00

12 lines
202 B
Plaintext

QA output created by 502
Contents of test directory before the power failure:
SCRATCH_MNT/testdir:
bar
foo
qwerty
Contents of test directory after the power failure:
SCRATCH_MNT/testdir:
bar
foo
qwerty