1. 22 Mar, 2012 4 commits
    • Dave Chinner's avatar
      xfs: introduce an allocation workqueue · c999a223
      Dave Chinner authored
      We currently have significant issues with the amount of stack that
      allocation in XFS uses, especially in the writeback path. We can
      easily consume 4k of stack between mapping the page, manipulating
      the bmap btree and allocating blocks from the free list. Not to
      mention btree block readahead and other functionality that issues IO
      in the allocation path.
      
      As a result, we can no longer fit allocation in the writeback path
      in the stack space provided on x86_64. To alleviate this problem,
      introduce an allocation workqueue and move all allocations to a
      seperate context. This can be easily added as an interposing layer
      into xfs_alloc_vextent(), which takes a single argument structure
      and does not return until the allocation is complete or has failed.
      
      To do this, add a work structure and a completion to the allocation
      args structure. This allows xfs_alloc_vextent to queue the args onto
      the workqueue and wait for it to be completed by the worker. This
      can be done completely transparently to the caller.
      
      The worker function needs to ensure that it sets and clears the
      PF_TRANS flag appropriately as it is being run in an active
      transaction context. Work can also be queued in a memory reclaim
      context, so a rescuer is needed for the workqueue.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      c999a223
    • Dave Chinner's avatar
      xfs: Fix open flag handling in open_by_handle code · 1a1d7724
      Dave Chinner authored
      Sparse identified some unsafe handling of open flags in the xfs open
      by handle ioctl code. Update the code to use the correct access
      macros to ensure that we handle the open flags correctly.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      1a1d7724
    • Kamal Dasu's avatar
      xfs: fix deadlock in xfs_rtfree_extent · 5575acc7
      Kamal Dasu authored
      To fix the deadlock caused by repeatedly calling xfs_rtfree_extent
      
       - removed xfs_ilock() and xfs_trans_ijoin() from xfs_rtfree_extent(),
         instead added asserts that the inode is locked and has an inode_item
         attached to it.
       - in xfs_bunmapi() when dealing with an inode with the rt flag
         call xfs_ilock() and xfs_trans_ijoin() so that the
         reference count is bumped on the inode and attached it to the
         transaction before calling into xfs_bmap_del_extent, similar to
         what we do in xfs_bmap_rtalloc.
      Signed-off-by: default avatarKamal Dasu <kdasu.kdev@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      5575acc7
    • Gerard Snitselaar's avatar
      fs: xfs: fix section mismatch in linux-next · 1c2ccc66
      Gerard Snitselaar authored
      xfs_qm_exit() is called in init_xfs_fs().
      Signed-off-by: default avatarGerard Snitselaar <dev@snitselaar.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      1c2ccc66
  2. 15 Mar, 2012 4 commits
  3. 14 Mar, 2012 6 commits
  4. 13 Mar, 2012 5 commits
  5. 05 Mar, 2012 3 commits
  6. 29 Feb, 2012 3 commits
  7. 25 Feb, 2012 1 commit
    • Alex Elder's avatar
      xfs: only take the ILOCK in xfs_reclaim_inode() · ad637a10
      Alex Elder authored
      At the end of xfs_reclaim_inode(), the inode is locked in order to
      we wait for a possible concurrent lookup to complete before the
      inode is freed.  This synchronization step was taking both the ILOCK
      and the IOLOCK, but the latter was causing lockdep to produce
      reports of the possibility of deadlock.
      
      It turns out that there's no need to acquire the IOLOCK at this
      point anyway.  It may have been required in some earlier version of
      the code, but there should be no need to take the IOLOCK in
      xfs_iget(), so there's no (longer) any need to get it here for
      synchronization.  Add an assertion in xfs_iget() as a reminder
      of this assumption.
      
      Dave Chinner diagnosed this on IRC, and Christoph Hellwig suggested
      no longer including the IOLOCK.  I just put together the patch.
      Signed-off-by: default avatarAlex Elder <elder@dreamhost.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      ad637a10
  8. 23 Feb, 2012 13 commits
  9. 21 Feb, 2012 1 commit
    • Mitsuo Hayasaka's avatar
      xfs: make inode quota check more general · 33e0edaf
      Mitsuo Hayasaka authored
      The xfs checks quota when reserving disk blocks and inodes. In the block
      reservation, it checks if the total number of blocks including current
      usage and new reservation exceed quota. In the inode reservation,
      it checks using the total number of inodes including only current usage
      without new reservation. However, this inode quota check works well
      since the caller of xfs_trans_dquot() always sets the argument of the
      number of new inode reservation to 1 or 0 and inode is reserved one by
      one in current xfs.
      
      To make it more general, this patch changes it to the same way as the
      block quota check.
      Signed-off-by: default avatarMitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
      Cc: Ben Myers <bpm@sgi.com>
      Cc: Alex Elder <elder@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit c922bbc8)
      33e0edaf