1. 17 10月, 2008 1 次提交
    • T
      ext4: Replace hackish ext4_mb_poll_new_transaction with commit callback · 3e624fc7
      Theodore Ts'o 提交于
      The multiblock allocator needs to be able to release blocks (and issue
      a blkdev discard request) when the transaction which freed those
      blocks is committed.  Previously this was done via a polling mechanism
      when blocks are allocated or freed.  A much better way of doing things
      is to create a jbd2 callback function and attaching the list of blocks
      to be freed directly to the transaction structure.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      3e624fc7
  2. 18 10月, 2008 1 次提交
  3. 16 10月, 2008 2 次提交
  4. 14 10月, 2008 1 次提交
  5. 10 10月, 2008 2 次提交
    • F
      ext4: fix initialization of UNINIT bitmap blocks · c806e68f
      Frederic Bohe 提交于
      This fixes a bug which caused on-line resizing of filesystems with a
      1k blocksize to fail.  The root cause of this bug was the fact that if
      an uninitalized bitmap block gets read in by userspace (which
      e2fsprogs does try to avoid, but can happen when the blocksize is less
      than the pagesize and an adjacent blocks is read into memory)
      ext4_read_block_bitmap() was erroneously depending on the buffer
      uptodate flag to decide whether it needed to initialize the bitmap
      block in memory --- i.e., to set the standard set of blocks in use by
      a block group (superblock, bitmaps, inode table, etc.).  Essentially,
      ext4_read_block_bitmap() assumed it was the only routine that might
      try to read a block containing a block bitmap, which is simply not
      true.  
      
      To fix this, ext4_read_block_bitmap() and ext4_read_inode_bitmap()
      must always initialize uninitialized bitmap blocks.  Once a block or
      inode is allocated out of that bitmap, it will be marked as
      initialized in the block group descriptor, so in general this won't
      result any extra unnecessary work.
      Signed-off-by: NFrederic Bohe <frederic.bohe@bull.net>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c806e68f
    • T
      ext4: Remove old legacy block allocator · c2ea3fde
      Theodore Ts'o 提交于
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c2ea3fde
  6. 24 9月, 2008 1 次提交
  7. 23 9月, 2008 1 次提交
  8. 14 9月, 2008 2 次提交
  9. 10 10月, 2008 1 次提交
  10. 09 9月, 2008 1 次提交
  11. 09 10月, 2008 1 次提交
    • A
      ext4: Make sure all the block allocation paths reserve blocks · a30d542a
      Aneesh Kumar K.V 提交于
      With delayed allocation we need to make sure block are reserved before
      we attempt to allocate them. Otherwise we get block allocation failure
      (ENOSPC) during writepages which cannot be handled. This would mean
      silent data loss (We do a printk stating data will be lost). This patch
      updates the DIO and fallocate code path to do block reservation before
      block allocation. This is needed to make sure parallel DIO and fallocate
      request doesn't take block out of delayed reserve space.
      
      When free blocks count go below a threshold we switch to a slow patch
      which looks at other CPU's accumulated percpu counter values.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a30d542a
  12. 09 9月, 2008 1 次提交
  13. 19 8月, 2008 1 次提交
  14. 24 7月, 2008 3 次提交
  15. 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
  16. 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
  17. 12 7月, 2008 5 次提交
  18. 14 7月, 2008 2 次提交
  19. 12 7月, 2008 7 次提交
  20. 06 6月, 2008 1 次提交
  21. 16 5月, 2008 1 次提交
  22. 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
  23. 13 5月, 2008 1 次提交
  24. 30 4月, 2008 1 次提交