generic: test fsync new file after removing hard link
authorFilipe Manana <fdmanana@suse.com>
Wed, 28 Feb 2018 15:58:00 +0000 (15:58 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sat, 3 Mar 2018 16:50:45 +0000 (00:50 +0800)
commit204860fa5c454e2b3b75fb3c8fc15dd9b6115a70
tree764b8243917bf9463386360bf26a721ca4bbffae
parent5db58785e620705be94813d6fc19cd3b7616c187
generic: test fsync new file after removing hard link

Test that if we have a file with two hard links in the same parent
directory, then remove of the links, create a new file in the same
parent directory and with the name of the link removed, fsync the new
file and have a power loss, mounting the filesystem succeeds.

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

  "Btrfs: fix log replay failure after unlink and link combination"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/480 [new file with mode: 0755]
tests/generic/480.out [new file with mode: 0644]
tests/generic/group