1. 05 2月, 2013 1 次提交
    • T
      ext4: optimize mballoc for large allocations · 40ae3487
      Theodore Ts'o 提交于
      The ext4 block allocator only maintains buddy bitmaps for chunks which
      are less than or equal to one quarter of a block group.  That is, for
      a file aystem with a 1k blocksize, and where the number of blocks in a
      block group is 8192 blocks, the largest chunk size tracked by buddy
      bitmaps is 2048 blocks.
      
      For a file system with a 4k blocksize, and where the number of blocks
      in a block group is 32768 blocks, the largest chunk size tracked by
      buddy bitmaps is 8192 blocks.
      
      To work around this code, mballoc.c before this commit would truncate
      allocation requests to the number of blocks in a block group minus 10.
      Why 10?  Aside from being a completely arbitrary number, it avoids
      block allocation to be a power of two larger than 25% of the block
      group.  If you try to explicitly fallocate 50% of the block group
      size, this will demonstrate the problem; the block allocation code
      will scan the all of the blocks in the file system with cr==0 (since
      the request is for a natural power of two), but then completely fail
      for all blocks groups, since the buddy bitmaps don't track chunk sizes
      of 50% of the block group.
      
      To fix this, in these we use ext4_mb_complex_scan_group() instead of
      ext4_mb_simple_scan_group().
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: Andreas Dilger <adilger@dilger.ca>
      40ae3487
  2. 02 2月, 2013 1 次提交
  3. 09 11月, 2012 3 次提交
  4. 23 10月, 2012 1 次提交
  5. 22 10月, 2012 1 次提交
  6. 27 9月, 2012 2 次提交
  7. 24 9月, 2012 1 次提交
  8. 19 9月, 2012 1 次提交
    • T
      ext4: re-enable -o discard functionality in no-journal mode · b5e2368b
      Theodore Ts'o 提交于
      This is a revert of commit b56ff9d3, which removed the call to
      ext4_issue_discard() to fix a BUG reported because
      ext4_issue_discard() was being called from inside a block group
      spinlock.  As it turns out this bug had already been fixed by Lukas
      Czerner in commit 53fdcf99 by the simple expedient of moving when
      we call ext4_issue_discard() outside the spinlock.
      
      So it should be safe to re-enable this functionality, which I tested
      by putting an BUG_ON(in_atomic) just after the restored callsite to
      ext4_issue_discard().
      
      Addresses-Google-Bug: #6750518
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: Anatol Pomozov <anatol.pomozov@gmail.com>
      b5e2368b
  9. 05 9月, 2012 1 次提交
    • T
      ext4: grow the s_group_info array as needed · 28623c2f
      Theodore Ts'o 提交于
      Previously we allocated the s_group_info array with enough space for
      any future possible growth of the file system via online resize.  This
      is unfortunate because it wastes memory, and it doesn't work for the
      meta_bg scheme, since there is no limit based on the number of
      reserved gdt blocks.  So add the code to grow the s_group_info array
      as needed.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      28623c2f
  10. 02 9月, 2012 1 次提交
  11. 17 8月, 2012 2 次提交
  12. 23 7月, 2012 1 次提交
  13. 10 7月, 2012 1 次提交
  14. 01 7月, 2012 1 次提交
    • A
      ext4: avoid uneeded calls to ext4_mb_load_buddy() while reading mb_groups · 1c8457ca
      Aditya Kali 提交于
      Currently ext4_mb_load_buddy is called for every group, irrespective
      of whether the group info is already in memory, while reading
      /proc/fs/ext4/<partition>/mb_groups proc file.  For the purpose of
      mb_groups proc file, it is unnecessary to load the file group info
      from disk if it was loaded in past.  These calls to ext4_mb_load_buddy
      make reading the mb_groups proc file expensive.
      
      Also, the locks around ext4_get_group_info are not required.
      
      This patch modifies the code to call ext4_mb_load_buddy only if the
      group info had never been loaded into memory in past. It also removes
      the mb group locking around ext4_get_group_info call.
      Signed-off-by: NAditya Kali <adityakali@google.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      1c8457ca
  15. 01 6月, 2012 2 次提交
  16. 29 5月, 2012 2 次提交
  17. 30 4月, 2012 2 次提交
  18. 22 3月, 2012 3 次提交
  19. 20 3月, 2012 2 次提交
  20. 21 2月, 2012 4 次提交
  21. 19 12月, 2011 1 次提交
  22. 26 10月, 2011 4 次提交
  23. 21 10月, 2011 1 次提交
  24. 06 10月, 2011 1 次提交