kernel_optimize_test/fs/xfs
Christoph Hellwig bc990f5cb4 xfs: fix locking in xfs_iget_cache_hit
The locking in xfs_iget_cache_hit currently has numerous problems:

 - we clear the reclaim tag without i_flags_lock which protects
   modifications to it
 - we call inode_init_always which can sleep with pag_ici_lock
   held (this is oss.sgi.com BZ #819)
 - we acquire and drop i_flags_lock a lot and thus provide no
   consistency between the various flags we set/clear under it

This patch fixes all that with a major revamp of the locking in
the function.  The new version acquires i_flags_lock early and
only drops it once we need to call into inode_init_always or before
calling xfs_ilock.

This patch fixes a bug seen in the wild where we race modifying the
reclaim tag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-08-17 01:23:48 -05:00
..
linux-2.6 xfs: fix locking in xfs_iget_cache_hit 2009-08-17 01:23:48 -05:00
quota xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
support
Kconfig xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
Makefile xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_acl.h switch xfs to generic acl caching helpers 2009-06-24 08:17:07 -04:00
xfs_ag.h xfs: introduce a per-ag inode iterator 2009-06-08 15:35:14 +02:00
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_alloc.c
xfs_alloc.h
xfs_arch.h xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_attr.c xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get 2009-08-12 01:08:01 -05:00
xfs_attr.h
xfs_bit.c
xfs_bit.h
xfs_bmap_btree.c xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_bmap_btree.h
xfs_bmap.c xfs: switch to NOFS allocation under i_lock in xfs_getbmap 2009-08-12 01:06:59 -05:00
xfs_bmap.h
xfs_btree_trace.c
xfs_btree_trace.h
xfs_btree.c use XFS_CORRUPTION_ERROR in xfs_btree_check_sblock 2009-08-12 01:08:10 -05:00
xfs_btree.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c xfs: switch to NOFS allocation under i_lock in xfs_da_buf_make 2009-08-12 01:07:14 -05:00
xfs_da_btree.h
xfs_dfrag.c xfs: fix double unlock in xfs_swap_extents() 2009-06-01 22:59:29 -05:00
xfs_dfrag.h
xfs_dinode.h
xfs_dir2_block.c
xfs_dir2_block.h
xfs_dir2_data.c
xfs_dir2_data.h
xfs_dir2_leaf.c
xfs_dir2_leaf.h
xfs_dir2_node.c
xfs_dir2_node.h
xfs_dir2_sf.c
xfs_dir2_sf.h
xfs_dir2_trace.c
xfs_dir2_trace.h
xfs_dir2.c xfs: switch to NOFS allocation under i_lock in xfs_dir_cilookup_result 2009-08-12 01:07:23 -05:00
xfs_dir2.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_filestream.c xfs: split xfs_sync_inodes 2009-06-08 15:35:48 +02:00
xfs_filestream.h
xfs_fs.h xfs: update max log size 2009-06-08 15:32:59 +02:00
xfs_fsops.c xfs: avoid memory allocation under m_peraglock in growfs code 2009-08-12 01:06:51 -05:00
xfs_fsops.h
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_ialloc.c
xfs_ialloc.h
xfs_iget.c xfs: fix locking in xfs_iget_cache_hit 2009-08-17 01:23:48 -05:00
xfs_inode_item.c
xfs_inode_item.h
xfs_inode.c xfs: check for dinode realtime flag corruption 2009-08-12 01:08:21 -05:00
xfs_inode.h xfs: fix freeing of inodes not yet added to the inode cache 2009-08-07 14:38:34 -03:00
xfs_inum.h
xfs_iomap.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_iomap.h
xfs_itable.c
xfs_itable.h
xfs_log_priv.h
xfs_log_recover.c xfs: validate quota log items during log recovery 2009-06-08 15:33:21 +02:00
xfs_log_recover.h
xfs_log.c xfs: fix spin_is_locked assert on uni-processor builds 2009-08-12 01:08:27 -05:00
xfs_log.h
xfs_mount.c xfs: remove unused parameter from xfs_reclaim_inodes 2009-06-08 15:35:12 +02:00
xfs_mount.h xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_quota.h xfs: fix warnings with CONFIG_XFS_QUOTA disabled 2009-06-12 21:15:12 -05:00
xfs_refcache.h
xfs_rename.c xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_rtalloc.c
xfs_rtalloc.h
xfs_rw.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_rw.h
xfs_sb.h
xfs_trans_ail.c
xfs_trans_buf.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_item.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_trans.c Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus 2009-06-12 21:28:59 -05:00
xfs_trans.h
xfs_types.h
xfs_utils.c xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_utils.h
xfs_vnodeops.c xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap 2009-08-12 01:07:53 -05:00
xfs_vnodeops.h xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs.h