1. 30 10月, 2008 7 次提交
  2. 28 7月, 2008 4 次提交
    • L
      [XFS] Allow xfs_bmbt_split() to fallback to the lowspace allocator · 313b5c76
      Lachlan McIlroy 提交于
      algorithm
      
      If xfs_bmbt_split() cannot find an AG with sufficient free space to
      satisfy a full extent btree split then fall back to the lowspace allocator
      algorithm.
      
      SGI-PV: 983338
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31359a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      313b5c76
    • L
      [XFS] Restore the lowspace extent allocator algorithm · b877e3d3
      Lachlan McIlroy 提交于
      When free space is running low the extent allocator may choose to allocate
      an extent from an AG without leaving sufficient space for a btree split
      when inserting the new extent (see where xfs_bmap_btalloc() sets minleft
      to 0). In this case the allocator will enable the lowspace algorithm which
      is supposed to allow further allocations (such as btree splits and
      newroots) to allocate from sequential AGs. This algorithm has been broken
      for a long time and this patch restores its behaviour.
      
      SGI-PV: 983338
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31358a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      b877e3d3
    • L
      [XFS] use minleft when allocating in xfs_bmbt_split() · 4ddd8bb1
      Lachlan McIlroy 提交于
      The bmap btree split code relies on a previous data extent allocation
      (from xfs_bmap_btalloc()) to find an AG that has sufficient space to
      perform a full btree split, when inserting the extent. When converting
      unwritten extents we don't allocate a data extent so a btree split will be
      the first allocation. In this case we need to set minleft so the allocator
      will pick an AG that has space to complete the split(s).
      
      SGI-PV: 983338
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31357a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      4ddd8bb1
    • L
      [XFS] Always reset btree cursor after an insert · ddea2d52
      Lachlan McIlroy 提交于
      After a btree insert operation a cursor can be invalid due to block splits
      and a maybe a new root block. We reset the cursor in xfs_bmbt_insert() in
      the cases where we think we need to but it isn't enough as we still see
      assertions. Just do what we do elsewhere and reset the cursor
      unconditionally. Also remove the fix to revalidate the original cursor in
      xfs_bmbt_insert().
      
      SGI-PV: 983336
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31342a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      ddea2d52
  3. 18 4月, 2008 2 次提交
    • H
      [XFS] replace remaining __FUNCTION__ occurrences · 34a622b2
      Harvey Harrison 提交于
      __FUNCTION__ is gcc-specific, use __func__
      
      SGI-PV: 976035
      SGI-Modid: xfs-linux-melb:xfs-kern:30775a
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      34a622b2
    • D
      [XFS] Ensure a btree insert returns a valid cursor. · 59a33f9f
      David Chinner 提交于
      When writing into preallocated regions there is a case where XFS can oops
      or hang doing the unwritten extent conversion on I/O completion. It turns
      out that the problem is related to the btree cursor being invalid.
      
      When we do an insert into the tree, we may need to split blocks in the
      tree. When we only split at the leaf level (i.e. level 0), everything
      works just fine. However, if we have a multi-level split in the btreee,
      the cursor passed to the insert function is no longer valid once the
      insert is complete.
      
      The leaf level split is handled correctly because all the operations at
      level 0 are done using the original cursor, hence it is updated correctly.
      However, when we need to update the next level up the tree, we don't use
      that cursor - we use a cloned cursor that points to the index in the next
      level up where we need to do the insert.
      
      Hence if we need to split a second level, the changes to the tree are
      reflected in the cloned cursor and not the original cursor. This
      clone-and-move-up-a-level-on-split behaviour recurses all the way to the
      top of the tree.
      
      The complexity here is that these cloned cursors do not point to the
      original index that was inserted - they point to the newly allocated block
      (the right block) and the original cursor pointer to that level may still
      point to the left block. Hence, without deep examination of the cloned
      cursor and buffers, we cannot update the original cursor with the new path
      from the cloned cursor.
      
      In these cases the original cursor could be pointing to the wrong block(s)
      and hence a subsequent modification to the tree using that cursor will
      lead to corruption of the tree.
      
      The crash case occurs when the tree changes height - we insert a new level
      in the tree, and the cursor does not have a buffer in it's path for that
      level. Hence any attempt to walk back up the cursor to the root block will
      result in a null pointer dereference.
      
      To make matters even more complex, the BMAP BT is rooted in an inode, so
      we can have a change of height in the btree *without a root split*. That
      is, if the root block in the inode is full when we split a leaf node, we
      cannot fit the pointer to the new block in the root, so we allocate a new
      block, migrate all the ptrs out of the inode into the new block and point
      the inode root block at the newly allocated block. This changes the height
      of the tree without a root split having occurred and hence invalidates the
      path in the original cursor.
      
      The patch below prevents xfs_bmbt_insert() from returning with an invalid
      cursor by detecting the cases that invalidate the original cursor and
      refresh it by do a lookup into the btree for the original index we were
      inserting at.
      
      Note that the INOBT, AGFBNO and AGFCNT btree implementations also have
      this bug, but the cursor is currently always destroyed or revalidated
      after an insert for those trees. Hence this patch only address the problem
      in the BMBT code.
      
      SGI-PV: 979339
      SGI-Modid: xfs-linux-melb:xfs-kern:30701a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      59a33f9f
  4. 14 2月, 2008 1 次提交
  5. 07 2月, 2008 1 次提交
    • E
      [XFS] optimize XFS_IS_REALTIME_INODE w/o realtime config · 71ddabb9
      Eric Sandeen 提交于
      Use XFS_IS_REALTIME_INODE in more places, and #define it to 0 if
      CONFIG_XFS_RT is off. This should be safe because mount checks in
      xfs_rtmount_init:
      
      so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should be
      encountered after that.
      
      Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space,
      presumeably gcc can optimize around the various "if (0)" type checks:
      
      xfs_alloc_file_space -8 xfs_bmap_adjacent -16 xfs_bmapi -8
      xfs_bmap_rtalloc -16 xfs_bunmapi -28 xfs_free_file_space -64 xfs_imap +8
      <-- ? hmm. xfs_iomap_write_direct -12 xfs_qm_dqusage_adjust -4
      xfs_qm_vop_chown_reserve -4
      
      SGI-PV: 971186
      SGI-Modid: xfs-linux-melb:xfs-kern:30014a
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      71ddabb9
  6. 15 10月, 2007 5 次提交
  7. 14 7月, 2007 1 次提交
  8. 10 2月, 2007 3 次提交
  9. 28 9月, 2006 4 次提交
  10. 20 6月, 2006 1 次提交
  11. 09 6月, 2006 1 次提交
    • Y
      [XFS] In actual allocation of file system blocks and freeing extents, the · d210a28c
      Yingping Lu 提交于
      transaction within each such operation may involve multiple locking of AGF
      buffer. While the freeing extent function has sorted the extents based on
      AGF number before entering into transaction, however, when the file system
      space is very limited, the allocation of space would try every AGF to get
      space allocated, this could potentially cause out-of-order locking, thus
      deadlock could happen. This fix mitigates the scarce space for allocation
      by setting aside a few blocks without reservation, and avoid deadlock by
      maintaining ascending order of AGF locking.
      
      SGI-PV: 947395
      SGI-Modid: xfs-linux-melb:xfs-kern:210801a
      Signed-off-by: NYingping Lu <yingping@sgi.com>
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      d210a28c
  12. 14 3月, 2006 1 次提交
    • M
      [XFS] 929045 567344 This mod re-organizes some of the in-core file extent · 4eea22f0
      Mandy Kirkconnell 提交于
      code to prepare for an upcoming mod which will introduce multi-level
      in-core extent allocations. Although the in-core extent management is
      using a new code path in this mod, the functionality remains the same. 
      Major changes include:	- Introduce 10 new subroutines which re-orgainze
      the existing code but	do NOT change functionality:	    
      xfs_iext_get_ext()	   xfs_iext_insert()	     xfs_iext_add()	  
       xfs_iext_remove()	   xfs_iext_remove_inline()	   
      xfs_iext_remove_direct()	 xfs_iext_realloc_direct()	  
      xfs_iext_direct_to_inline()	    xfs_iext_inline_to_direct()        
      xfs_iext_destroy() - Remove 2 subroutines (functionality moved to new
      subroutines above):	    xfs_iext_realloc() -replaced by xfs_iext_add()
      and xfs_iext_remove()	      xfs_bmap_insert_exlist() - replaced by
      xfs_iext_insert()	  xfs_bmap_delete_exlist() - replaced by
      xfs_iext_remove() - Replace all hard-coded (indexed) extent assignments
      with a call to	 xfs_iext_get_ext() - Replace all extent record pointer
      arithmetic (ep++, ep--, base + lastx,..)   with calls to
      xfs_iext_get_ext() - Update comments to remove the idea of a single
      "extent list" and   introduce "extent record" terminology instead
      
      SGI-PV: 928864
      SGI-Modid: xfs-linux-melb:xfs-kern:207390a
      Signed-off-by: NMandy Kirkconnell <alkirkco@sgi.com>
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      4eea22f0
  13. 02 11月, 2005 3 次提交
  14. 08 9月, 2005 1 次提交
  15. 21 6月, 2005 1 次提交
  16. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4