1. 03 8月, 2008 1 次提交
    • E
      ext4: lock block groups when initializing · b5f10eed
      Eric Sandeen 提交于
      I noticed when filling a 1T filesystem with 4 threads using the
      fs_mark benchmark:
      
      fs_mark -d /mnt/test -D 256 -n 100000 -t 4 -s 20480 -F -S 0
      
      that I occasionally got checksum mismatch errors:
      
      EXT4-fs error (device sdb): ext4_init_inode_bitmap: Checksum bad for group 6935
      
      etc.  I'd reliably get 4-5 of them during the run.
      
      It appears that the problem is likely a race to init the bg's
      when the uninit_bg feature is enabled.
      
      With the patch below, which adds sb_bgl_locking around initialization,
      I was able to complete several runs with no errors or warnings.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      b5f10eed
  2. 15 7月, 2008 1 次提交
    • M
      ext4: delayed allocation ENOSPC handling · d2a17637
      Mingming Cao 提交于
      This patch does block reservation for delayed
      allocation, to avoid ENOSPC later at page flush time.
      
      Blocks(data and metadata) are reserved at da_write_begin()
      time, the freeblocks counter is updated by then, and the number of
      reserved blocks is store in per inode counter.
              
      At the writepage time, the unused reserved meta blocks are returned
      back. At unlink/truncate time, reserved blocks are properly released.
      
      Updated fix from  Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      to fix the oldallocator block reservation accounting with delalloc, added
      lock to guard the counters and also fix the reservation for meta blocks.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      d2a17637
  3. 12 7月, 2008 5 次提交
  4. 14 7月, 2008 2 次提交
  5. 12 7月, 2008 7 次提交
  6. 06 6月, 2008 1 次提交
  7. 16 5月, 2008 1 次提交
  8. 14 5月, 2008 1 次提交
    • V
      ext4: mballoc fix mb_normalize_request algorithm for 1KB block size filesystems · 1930479c
      Valerie Clement 提交于
      In case of inode preallocation, the number of blocks to allocate depends
      on the file size and it is calculated in ext4_mb_normalize_request().
      Each group in the filesystem is then checked to find one that can be
      used for allocation; this is done in ext4_mb_good_group().
      
      When a file bigger than 4MB is created, the requested number of blocks
      to preallocate, calculated by ext4_mb_normalize_request is 4096.
      However for a filesystem with 1KB block size, the maximum size of the
      block buddies used by the multiblock allocator is 2048, so none of
      groups in the filesystem satisfies the search criteria in
      ext4_mb_good_group(). Scanning all the filesystem groups impacts
      performance.
      
      This was demonstrated by using a freshly created, 70GB, 1k block
      filesystem, with caches dropped write before the test via
      /proc/sys/vm/drop_caches, and with the filesystem mounted with
      nodelalloc and nodealloc,nomballoc.  The time to write an 8 megabyte
      file using "dd if=/dev/zero of=/mnt/test/fo bs=8k count=1k conv=fsync"
      took 35.5091 seconds (236kB/s) with nodellaloc, and 0.233754 seconds
      (35.9 MB/s) with the nodelloc,nomballoc options.  With a 1TB partition,
      it took several minutes to write 8MB!
      
      This patch modifies the algorithm in ext4_mb_normalize_group_request to
      calculate the number of blocks to allocate by taking into account the
      maximum size of free blocks chunks handled by the multiblock allocator.
      
      It has also been tested for filesystems with 2KB and 4KB block sizes to
      ensure that those cases don't regress.
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NValerie Clement <valerie.clement@bull.net>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      1930479c
  9. 13 5月, 2008 1 次提交
  10. 30 4月, 2008 5 次提交
  11. 29 4月, 2008 2 次提交
  12. 17 4月, 2008 4 次提交
  13. 29 4月, 2008 1 次提交
    • E
      ext4: reduce mballoc stack usage with noinline_for_stack · 4ddfef7b
      Eric Sandeen 提交于
      mballoc.c is a whole lot of static functions, which gcc seems to
      really like to inline.
      
      With the changes below, on x86, I can at least get from:
      
      432 ext4_mb_new_blocks
      240 ext4_mb_free_blocks
      208 ext4_mb_discard_group_preallocations
      188 ext4_mb_seq_groups_show
      164 ext4_mb_init_cache
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      ...
      
      to
      
      220 ext4_mb_free_blocks
      188 ext4_mb_seq_groups_show
      176 ext4_mb_regular_allocator
      164 ext4_mb_init_cache
      156 ext4_mb_new_blocks
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      124 ext4_mb_release_group_pa
      ...
      
      which still has some big functions in there, but not 432 bytes!
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      4ddfef7b
  14. 23 2月, 2008 1 次提交
  15. 16 2月, 2008 2 次提交
  16. 10 2月, 2008 3 次提交
  17. 29 1月, 2008 1 次提交