linux/fs/xfs
Dave Chinner df150ed102 xfs: remote attributes need to be considered data
We don't log remote attribute contents, and instead write them
synchronously before we commit the block allocation and attribute
tree update transaction. As a result we are writing to the allocated
space before the allcoation has been made permanent.

As a result, we cannot consider this allocation to be a metadata
allocation. Metadata allocation can take blocks from the free list
and so reuse them before the transaction that freed the block is
committed to disk. This behaviour is perfectly fine for journalled
metadata changes as log recovery will ensure the free operation is
replayed before the overwrite, but for remote attribute writes this
is not the case.

Hence we have to consider the remote attribute blocks to contain
data and allocate accordingly. We do this by dropping the
XFS_BMAPI_METADATA flag from the block allocation. This means the
allocation will not use blocks that are on the busy list without
first ensuring that the freeing transaction has been committed to
disk and the blocks removed from the busy list. This ensures we will
never overwrite a freed block without first ensuring that it is
really free.

cc: <stable@vger.kernel.org>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2015-07-29 11:48:02 +10:00
..
libxfs xfs: remote attributes need to be considered data 2015-07-29 11:48:02 +10:00
Kconfig
kmem.c
kmem.h
Makefile
mrlock.h
uuid.c
uuid.h
xfs_acl.c
xfs_acl.h
xfs_aops.c xfs: update for 4.2-rc1 2015-06-30 20:16:08 -07:00
xfs_aops.h xfs: add DAX file operations support 2015-06-04 09:18:53 +10:00
xfs_attr_inactive.c Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next 2015-06-23 08:49:01 +10:00
xfs_attr_list.c xfs: pass attr geometry to attr leaf header conversion functions 2015-04-13 11:26:02 +10:00
xfs_attr.h
xfs_bit.c
xfs_bmap_util.c Merge branch 'xfs-commit-cleanup' into for-next 2015-06-04 13:55:48 +10:00
xfs_bmap_util.h xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate 2015-03-25 15:08:56 +11:00
xfs_buf_item.c
xfs_buf_item.h
xfs_buf.c xfs: return a void pointer from xfs_buf_offset 2015-06-22 09:44:29 +10:00
xfs_buf.h xfs: return a void pointer from xfs_buf_offset 2015-06-22 09:44:29 +10:00
xfs_dir2_readdir.c
xfs_discard.c
xfs_discard.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_dquot.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_dquot.h
xfs_error.c xfs: remove inst_t 2015-06-22 09:44:02 +10:00
xfs_error.h xfs: remove inst_t 2015-06-22 09:44:02 +10:00
xfs_export.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c xfs: remove __psint_t and __psunsigned_t 2015-06-22 09:43:32 +10:00
xfs_extfree_item.h
xfs_file.c xfs: call dax_fault on read page faults for DAX 2015-07-29 11:48:00 +10:00
xfs_filestream.c xfs: clean up XFS_MIN_FREELIST macros 2015-06-22 10:13:30 +10:00
xfs_filestream.h
xfs_fsops.c Merge branch 'xfs-commit-cleanup' into for-next 2015-06-04 13:55:48 +10:00
xfs_fsops.h
xfs_globals.c
xfs_icache.c
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode_item.c
xfs_inode_item.h
xfs_inode.c Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next 2015-06-23 08:49:01 +10:00
xfs_inode.h
xfs_ioctl32.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xfs_ioctl32.h
xfs_ioctl.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_ioctl.h
xfs_iomap.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_iomap.h
xfs_iops.c xfs: update for 4.2-rc1 2015-06-30 20:16:08 -07:00
xfs_iops.h
xfs_itable.c xfs: use actual inode count for sparse records in bulkstat/inumbers 2015-05-29 09:04:19 +10:00
xfs_itable.h
xfs_linux.h xfs: remove xfs_caddr_t 2015-06-22 09:45:10 +10:00
xfs_log_cil.c xfs: fix xfs_log_done interface 2015-06-04 13:48:20 +10:00
xfs_log_priv.h xfs: use void pointers in log validation helpers 2015-06-22 09:44:47 +10:00
xfs_log_recover.c xfs: remote attribute headers contain an invalid LSN 2015-07-29 11:48:01 +10:00
xfs_log.c Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next 2015-06-23 08:49:01 +10:00
xfs_log.h xfs: fix xfs_log_done interface 2015-06-04 13:48:20 +10:00
xfs_message.c
xfs_message.h
xfs_mount.c Merge branch 'xfs-sparse-inode' into for-next 2015-06-01 10:51:38 +10:00
xfs_mount.h Merge branch 'xfs-dax-support' into for-next 2015-06-04 13:01:49 +10:00
xfs_mru_cache.c xfs: xfs_mru_cache_insert() should use GFP_NOFS 2015-03-25 14:57:53 +11:00
xfs_mru_cache.h
xfs_pnfs.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_pnfs.h xfs: unlock i_mutex in xfs_break_layouts 2015-04-13 11:38:29 +10:00
xfs_qm_bhv.c
xfs_qm_syscalls.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_qm.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_qm.h
xfs_quota.h xfs: fix quota block reservation leak when tp allocates and frees blocks 2015-06-01 07:15:37 +10:00
xfs_quotaops.c
xfs_rtalloc.c xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_rtalloc.h
xfs_stats.c
xfs_stats.h
xfs_super.c xfs: add initial DAX support 2015-06-04 09:19:18 +10:00
xfs_super.h
xfs_symlink.c Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next 2015-06-23 08:49:01 +10:00
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c
xfs_sysfs.h
xfs_trace.c
xfs_trace.h xfs: allocate sparse inode chunks on full chunk allocation failure 2015-05-29 09:18:32 +10:00
xfs_trans_ail.c xfs: remove __psint_t and __psunsigned_t 2015-06-22 09:43:32 +10:00
xfs_trans_buf.c
xfs_trans_dquot.c xfs: Clean up xfs_trans_dup_dqinfo 2015-06-01 10:50:00 +10:00
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h xfs: pass a boolean flag to xfs_trans_free_items 2015-06-04 13:47:43 +10:00
xfs_trans.c xfs: fix xfs_log_done interface 2015-06-04 13:48:20 +10:00
xfs_trans.h xfs: saner xfs_trans_commit interface 2015-06-04 13:48:08 +10:00
xfs_xattr.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xfs.h