1. 19 10月, 2011 17 次提交
  2. 18 10月, 2011 1 次提交
  3. 17 10月, 2011 2 次提交
  4. 15 10月, 2011 4 次提交
  5. 14 10月, 2011 8 次提交
  6. 13 10月, 2011 4 次提交
  7. 12 10月, 2011 3 次提交
  8. 11 10月, 2011 1 次提交
    • C
      Btrfs: make sure not to defrag extents past i_size · f7f43cc8
      Chris Mason 提交于
      The btrfs file defrag code will loop through the extents and
      force COW on them.  But there is a concurrent truncate in the middle of
      the defrag, it might end up defragging the same range over and over
      again.
      
      The problem is that writepage won't go through and do anything on pages
      past i_size, so the cow won't happen, so the file will appear to still
      be fragmented.  defrag will end up hitting the same extents again and
      again.
      
      In the worst case, the truncate can actually live lock with the defrag
      because the defrag keeps creating new ordered extents which the truncate
      code keeps waiting on.
      
      The fix here is to make defrag check for i_size inside the main loop,
      instead of just once before the looping starts.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      f7f43cc8