diff options
author | Brian Foster <bfoster@redhat.com> | 2015-10-12 07:40:24 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-10-12 07:40:24 +0300 |
commit | b7cdc66be54b64daef593894d12ecc405f117829 (patch) | |
tree | b0f6c6ee7bc6123f2e0a9ea9ac6d1de7634cf77b /fs/binfmt_flat.c | |
parent | 1f93e4a96c9109378204c147b3eec0d0e8100fde (diff) | |
download | linux-b7cdc66be54b64daef593894d12ecc405f117829.tar.xz |
xfs: log local to remote symlink conversions correctly on v5 supers
A local format symlink inode is converted to extent format when an
extended attribute is set on an inode as part of the attribute fork
creation. This means a block is allocated, the local symlink target name
is copied to the block and the block is logged. Currently,
xfs_bmap_local_to_extents() handles logging the remote block data based
on the size of the data fork prior to the conversion. This is not
correct on v5 superblock filesystems, which add an additional header to
remote symlink blocks that is nonexistent in local format inodes.
As a result, the full length of the remote symlink block content is not
logged. This can lead to corruption should a crash occur and log
recovery replay this transaction.
Since a callout is already used to initialize the new remote symlink
block, update the local-to-extents conversion mechanism to make the
callout also responsible for logging the block. It is already required
to set the log buffer type and format the block appropriately based on
the superblock version. This ensures the remote symlink is always logged
correctly. Note that xfs_bmap_local_to_extents() is only called for
symlinks so there are no other callouts that require modification.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/binfmt_flat.c')
0 files changed, 0 insertions, 0 deletions