1
linux/fs/xfs
Dave Chinner bc4010ecb8 xfs: use iolock on XFS_IOC_ALLOCSP calls
fsstress has a particular effective way of stopping debug XFS
kernels. We keep seeing assert failures due finding delayed
allocation extents where there should be none. This shows up when
extracting extent maps and we are holding all the locks we should be
to prevent races, so this really makes no sense to see these errors.

After checking that fsstress does not use mmap, it occurred to me
that fsstress uses something that no sane application uses - the
XFS_IOC_ALLOCSP ioctl interfaces for preallocation. These interfaces
do allocation of blocks beyond EOF without using preallocation, and
then call setattr to extend and zero the allocated blocks.

THe problem here is this is a buffered write, and hence the
allocation is a delayed allocation. Unlike the buffered IO path, the
allocation and zeroing are not serialised using the IOLOCK. Hence
the ALLOCSP operation can race with operations holding the iolock to
prevent buffered IO operations from occurring.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-05-14 16:20:53 -05:00
..
Kconfig
kmem.c
kmem.h xfs: use a normal shrinker for the dquot freelist 2012-02-10 12:38:09 -06:00
Makefile xfs: use common code for quota statistics 2012-03-14 11:09:06 -05:00
mrlock.h
time.h
uuid.c
uuid.h
xfs_acl.c xfs: fix acl count validation in xfs_acl_from_disk() 2011-12-16 15:17:42 -06:00
xfs_acl.h
xfs_ag.h
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_alloc.c xfs: fix fstrim offset calculations 2012-03-27 16:07:03 -05:00
xfs_alloc.h xfs: fix fstrim offset calculations 2012-03-27 16:07:03 -05:00
xfs_aops.c xfs: Use preallocation for inodes with extsz hints 2012-05-14 16:20:40 -05:00
xfs_aops.h xfs: log file size updates at I/O completion time 2012-03-13 16:30:49 -05:00
xfs_attr_leaf.c xfs: kill XBF_LOCK 2012-05-14 16:20:50 -05:00
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_attr.c xfs: kill XBF_DONTBLOCK 2012-05-14 16:20:52 -05:00
xfs_attr.h
xfs_bit.c
xfs_bit.h
xfs_bmap_btree.c
xfs_bmap_btree.h
xfs_bmap.c xfs: don't assert on delalloc regions beyond EOF 2012-05-14 16:20:38 -05:00
xfs_bmap.h xfs: cleanup xfs_bmap.h 2011-10-11 21:15:07 -05:00
xfs_btree.c xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF 2011-10-11 21:15:09 -05:00
xfs_btree.h
xfs_buf_item.c xfs: use blocks for storing the desired IO size 2012-05-14 16:20:48 -05:00
xfs_buf_item.h
xfs_buf.c xfs: kill XBF_DONTBLOCK 2012-05-14 16:20:52 -05:00
xfs_buf.h xfs: kill XBF_DONTBLOCK 2012-05-14 16:20:52 -05:00
xfs_da_btree.c xfs: use blocks for storing the desired IO size 2012-05-14 16:20:48 -05:00
xfs_da_btree.h
xfs_dfrag.c xfs: split in-core and on-disk inode log item fields 2012-03-13 17:08:17 -05:00
xfs_dfrag.h
xfs_dinode.h
xfs_dir2_block.c xfs: clean up minor sparse warnings 2012-03-14 13:21:17 -05:00
xfs_dir2_data.c
xfs_dir2_format.h
xfs_dir2_leaf.c xfs: introduce xfs_bmapi_read() 2011-10-11 21:15:03 -05:00
xfs_dir2_node.c
xfs_dir2_priv.h
xfs_dir2_sf.c
xfs_dir2.c
xfs_dir2.h
xfs_discard.c xfs: fix fstrim offset calculations 2012-03-27 16:07:03 -05:00
xfs_discard.h
xfs_dquot_item.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_dquot_item.h
xfs_dquot.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_dquot.h xfs: on-stack delayed write buffer lists 2012-05-14 16:20:31 -05:00
xfs_error.c
xfs_error.h
xfs_export.c xfs: fix nfs export of 64-bit inodes numbers on 32-bit kernels 2011-12-06 10:46:23 -06:00
xfs_export.h
xfs_extfree_item.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_extfree_item.h
xfs_file.c xfs: push the ilock into xfs_zero_eof 2012-05-14 16:20:20 -05:00
xfs_filestream.c xfs: rename allocation range fields in struct xfs_bmalloca 2011-10-11 21:15:06 -05:00
xfs_filestream.h
xfs_fs_subr.c xfs: remove the i_size field in struct xfs_inode 2012-01-17 15:08:53 -06:00
xfs_fs.h
xfs_fsops.c xfs: kill xfs_read_buf() 2012-05-14 16:20:51 -05:00
xfs_fsops.h
xfs_globals.c
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_ialloc.c xfs: kill XBF_LOCK 2012-05-14 16:20:50 -05:00
xfs_ialloc.h xfs: propagate umode_t 2012-01-03 22:55:00 -05:00
xfs_iget.c xfs: remove log item from AIL in xfs_iflush after a shutdown 2012-05-14 16:20:25 -05:00
xfs_inode_item.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_inode_item.h xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_inode.c xfs: kill XBF_LOCK 2012-05-14 16:20:50 -05:00
xfs_inode.h xfs: on-stack delayed write buffer lists 2012-05-14 16:20:31 -05:00
xfs_inum.h
xfs_ioctl32.c xfs: clean up minor sparse warnings 2012-03-14 13:21:17 -05:00
xfs_ioctl32.h
xfs_ioctl.c xfs: Fix open flag handling in open_by_handle code 2012-03-22 15:56:52 -05:00
xfs_ioctl.h
xfs_iomap.c xfs: limit specualtive delalloc to maxioffset 2012-05-14 16:20:39 -05:00
xfs_iomap.h
xfs_iops.c xfs: push the ilock into xfs_zero_eof 2012-05-14 16:20:20 -05:00
xfs_iops.h
xfs_itable.c xfs: don't cache inodes read through bulkstat 2012-03-26 17:19:08 -05:00
xfs_itable.h
xfs_linux.h
xfs_log_cil.c xfs: Do background CIL flushes via a workqueue 2012-05-14 16:20:34 -05:00
xfs_log_priv.h xfs: Do background CIL flushes via a workqueue 2012-05-14 16:20:34 -05:00
xfs_log_recover.c xfs: kill xfs_read_buf() 2012-05-14 16:20:51 -05:00
xfs_log_recover.h
xfs_log.c xfs: use blocks for storing the desired IO size 2012-05-14 16:20:48 -05:00
xfs_log.h xfs: allow assigning the tail lsn with the AIL lock held 2012-05-14 16:20:26 -05:00
xfs_message.c
xfs_message.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
xfs_mount.c xfs: clean up buffer get/read call API 2012-05-14 16:20:45 -05:00
xfs_mount.h xfs: Do background CIL flushes via a workqueue 2012-05-14 16:20:34 -05:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_qm_bhv.c xfs: remove the global xfs_Gqm structure 2012-03-14 12:06:32 -05:00
xfs_qm_syscalls.c xfs: remove the per-filesystem list of dquots 2012-03-14 11:53:34 -05:00
xfs_qm.c xfs: on-stack delayed write buffer lists 2012-05-14 16:20:31 -05:00
xfs_qm.h xfs: remove the global xfs_Gqm structure 2012-03-14 12:06:32 -05:00
xfs_quota_priv.h xfs: use per-filesystem radix trees for dquot lookup 2012-03-14 11:09:06 -05:00
xfs_quota.h Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage 2012-02-03 11:32:20 -06:00
xfs_quotaops.c
xfs_rename.c vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link} 2012-03-20 21:29:32 -04:00
xfs_rtalloc.c xfs: clean up buffer get/read call API 2012-05-14 16:20:45 -05:00
xfs_rtalloc.h
xfs_rw.c xfs: kill xfs_read_buf() 2012-05-14 16:20:51 -05:00
xfs_rw.h xfs: kill xfs_read_buf() 2012-05-14 16:20:51 -05:00
xfs_sb.h xfs: kill the unused XFS_BB_FSB_OFFSET macro 2012-02-02 17:08:04 -06:00
xfs_stats.c xfs: use common code for quota statistics 2012-03-14 11:09:06 -05:00
xfs_stats.h xfs: use common code for quota statistics 2012-03-14 11:09:06 -05:00
xfs_super.c xfs: Do background CIL flushes via a workqueue 2012-05-14 16:20:34 -05:00
xfs_super.h xfs: remove the global xfs_Gqm structure 2012-03-14 12:06:32 -05:00
xfs_sync.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_sync.h xfs: log timestamp updates 2012-03-13 17:01:15 -05:00
xfs_sysctl.c
xfs_sysctl.h
xfs_trace.c
xfs_trace.h xfs: use blocks for counting length of buffers 2012-05-14 16:20:47 -05:00
xfs_trans_ail.c xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_trans_buf.c xfs: kill XBF_DONTBLOCK 2012-05-14 16:20:52 -05:00
xfs_trans_dquot.c xfs: remove the global xfs_Gqm structure 2012-03-14 12:06:32 -05:00
xfs_trans_extfree.c
xfs_trans_inode.c xfs: split in-core and on-disk inode log item fields 2012-03-13 17:08:17 -05:00
xfs_trans_priv.h xfs: pass shutdown method into xfs_trans_ail_delete_bulk 2012-05-14 16:20:33 -05:00
xfs_trans_space.h
xfs_trans.c xfs: split and cleanup xfs_log_reserve 2012-02-22 22:37:04 -06:00
xfs_trans.h xfs: on-stack delayed write buffer lists 2012-05-14 16:20:31 -05:00
xfs_types.h
xfs_utils.c vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link} 2012-03-20 21:29:32 -04:00
xfs_utils.h xfs: propagate umode_t 2012-01-03 22:55:00 -05:00
xfs_vnode.h xfs: remove remaining scraps of struct xfs_iomap 2012-03-15 13:40:16 -05:00
xfs_vnodeops.c xfs: use iolock on XFS_IOC_ALLOCSP calls 2012-05-14 16:20:53 -05:00
xfs_vnodeops.h xfs: remove remaining scraps of struct xfs_iomap 2012-03-15 13:40:16 -05:00
xfs_xattr.c
xfs.h