generic: test creating a symlink and then fsync its parent directory
Test creating a symlink, fsync its parent directory, power fail and mount
again the filesystem. After these steps the symlink should exist and its
content must match what we specified when we created it (must not be
empty or point to something else).
This is motivated by an issue in btrfs where after the log replay happens
we get empty symlinks, which not only does not make much sense from a
user's point of view, it's also not valid to have empty links in linux
(wgich is explicitly forbidden by the symlink(2) system call).
The issue in btrfs is fixed by the following patch for the linux kernel:
"Btrfs: fix empty symlink after creating symlink and fsync parent dir"
Tested against ext3, ext4, xfs, f2fs, reiserfs and nilfs2.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>