1. 28 Apr, 2011 5 commits
    • David Sterba's avatar
      xfs: cleanup duplicate initializations · 45c51b99
      David Sterba authored
      follow these guidelines:
      - leave initialization in the declaration block if it fits the line
      - move to the code where it's more suitable ('for' init block)
      
      The last chunk was modified from David's original to be a correct
      fix for what appeared to be a duplicate initialization.
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      45c51b99
    • Christoph Hellwig's avatar
      xfs: reduce the number of pagb_lock roundtrips in xfs_alloc_clear_busy · 8a072a4d
      Christoph Hellwig authored
      Instead of finding the per-ag and then taking and releasing the pagb_lock
      for every single busy extent completed sort the list of busy extents and
      only switch betweens AGs where nessecary.  This becomes especially important
      with the online discard support which will hit this lock more often.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      8a072a4d
    • Christoph Hellwig's avatar
      xfs: exact busy extent tracking · 97d3ac75
      Christoph Hellwig authored
      Update the extent tree in case we have to reuse a busy extent, so that it
      always is kept uptodate.  This is done by replacing the busy list searches
      with a new xfs_alloc_busy_reuse helper, which updates the busy extent tree
      in case of a reuse.  This allows us to allow reusing metadata extents
      unconditionally, and thus avoid log forces especially for allocation btree
      blocks.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      97d3ac75
    • Christoph Hellwig's avatar
      xfs: do not immediately reuse busy extent ranges · e26f0501
      Christoph Hellwig authored
      Every time we reallocate a busy extent, we cause a synchronous log force
      to occur to ensure the freeing transaction is on disk before we continue
      and use the newly allocated extent.  This is extremely sub-optimal as we
      have to mark every transaction with blocks that get reused as synchronous.
      
      Instead of searching the busy extent list after deciding on the extent to
      allocate, check each candidate extent during the allocation decisions as
      to whether they are in the busy list.  If they are in the busy list, we
      trim the busy range out of the extent we have found and determine if that
      trimmed range is still OK for allocation. In many cases, this check can
      be incorporated into the allocation extent alignment code which already
      does trimming of the found extent before determining if it is a valid
      candidate for allocation.
      
      Based on earlier patches from Dave Chinner.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      e26f0501
    • Christoph Hellwig's avatar
      xfs: optimize AGFL refills · a870acd9
      Christoph Hellwig authored
      While we need to make sure we do not reuse busy extents, there is no need
      to force out busy extents when moving them between the AGFL and the
      freespace btree as we still take care of that when doing the real allocation.
      
      To avoid the log force when just moving extents from the different free
      space tracking structures, move the busy search out of
      xfs_alloc_get_freelist into the callers that need it, and move the busy
      list insert from xfs_free_ag_extent which is used both by AGFL refills
      and real allocation to xfs_free_extent, which is only used by the latter.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      a870acd9
  2. 20 Apr, 2011 1 commit
  3. 19 Apr, 2011 1 commit
  4. 18 Apr, 2011 30 commits
  5. 17 Apr, 2011 3 commits