Re: [PATCH] fstests: test creating a symlink and then fsync its parent directory

Josef Bacik
2016-05-12T16:30:19Z

On 04/24/2016 09:26 PM, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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>

Reviewed-by: Josef Bacik <jbacik@fb.com>

Thanks,

Josef