generic: test for data loss on fsync after evicting an inode and renaming it
authorFilipe Manana <fdmanana@suse.com>
Thu, 6 Jun 2019 11:07:47 +0000 (12:07 +0100)
committerEryu Guan <guaneryu@gmail.com>
Fri, 7 Jun 2019 12:04:34 +0000 (20:04 +0800)
commitd3665da45665bca454b2c89a9ecbe17a1f41d5ce
tree35b8716074c6c204970fff736d8e3dbe63c7019a
parent18b7c53fd650c2740061230d75147670cc5697b1
generic: test for data loss on fsync after evicting an inode and renaming it

Check that if we write some data to a file, its inode gets evicted
(while its parent directory's inode is not evicted due to being in
use), then we rename the file and fsync it, after a power failure
the file data is not lost.

This currently passes on xfs, ext4 and f2fs but fails on btrfs. The
following patch for btrfs fixes it:

  "Btrfs: fix data loss after inode eviction, renaming it, and fsync it"

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