generic: add test for fsync after renaming and linking special file
authorFilipe Manana <fdmanana@suse.com>
Wed, 28 Feb 2018 15:57:34 +0000 (15:57 +0000)
committerEryu Guan <guaneryu@gmail.com>
Sat, 3 Mar 2018 16:50:33 +0000 (00:50 +0800)
commit5db58785e620705be94813d6fc19cd3b7616c187
tree993419d81f16a3f8fbd866926ee0d912880dd8b2
parent697e465ca3351f983ff1ba256093791cadd00949
generic: add test for fsync after renaming and linking special file

Test that when a fsync journal/log exists, if we rename a special file
(fifo, symbolic link or device), create a hard link for it with its old
name and then commit the journal/log, if a power loss happens the
filesystem will not fail to replay the journal/log when it is mounted
the next time.

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

  "Btrfs: fix log replay failure after linking special file and fsync"

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/479 [new file with mode: 0644]
tests/generic/479.out [new file with mode: 0644]
tests/generic/group