1. 20 8月, 2008 4 次提交
    • M
      ext4: journal credits reservation fixes for extent file writepage · ee12b630
      Mingming Cao 提交于
      This patch modified the writepage/write_begin credit calculation for
      extent files, to use the credits caculation helper function.
      
      The current calculation of how many index/leaf blocks should be
      accounted is too conservetive, it always considered the worse case,
      where the tree level is 5, and in the case of multiple chunk
      allocations, it always assumed no blocks were dirtied in common across
      the allocations. This path uses the accurate depth of the inode with
      some extras to calculate the index blocks, and also less conservative in
      the case of multiple allocation accounting.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      ee12b630
    • M
      ext4: journal credits calulation cleanup and fix for non-extent writepage · a02908f1
      Mingming Cao 提交于
      When considering how many journal credits are needed for modifying a
      chunk of data, we need to account for the super block, inode block,
      quota blocks and xattr block, indirect/index blocks, also, group bitmap
      and group descriptor blocks for new allocation (including data and
      indirect/index blocks). There are many places in ext4 do the calculation
      on their own and often missed one or two meta blocks, and often they
      assume single block allocation, and did not considering the multile
      chunk of allocation case.
      
      This patch is trying to cleanup current journal credit code, provides
      some common helper funtion to calculate the journal credits, to be used
      for writepage, writepages, DIO, fallocate, migration, defrag, and for
      both nonextent and extent files.
      
      This patch modified the writepage/write_begin credit caculation for
      nonextent files, to use the new helper function. It also fixed the
      problem that writepage on nonextent files did not consider the case
      blocksize <pagesize, thus could possibelly need multiple block
      allocation in a single transaction.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a02908f1
    • E
      ext4: Fix bug where we return ENOSPC even though we have plenty of inodes · c001077f
      Eric Sandeen 提交于
      The find_group_flex() function starts with best_flex as the
      parent_fbg_group, which happens to have 0 inodes free.  Some of the
      flex groups searched have free blocks and free inodes, but the
      flex_freeb_ratio is < 10, so they're skipped.  Then when a group is
      compared to the current "best" flex group, it does not have more free
      blocks than "best", so it is skipped as well.
      
      This continues until no flex group with free inodes is found which has
      a proper ratio or which has more free blocks than the "best" group,
      and we're left with a "best" group that has 0 inodes free, and we
      return -ENOSPC.
      
      We fix this by changing the logic so that if the current "best" flex
      group has no inodes free, and the current one does have room, it is
      promoted to the next "best."
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c001077f
    • J
      ext4: don't try to resize if there are no reserved gdt blocks left · 37609fd5
      Josef Bacik 提交于
      When trying to resize an ext4 fs and you run out of reserved gdt blocks,
      you get an error that doesn't actually tell you what went wrong, it just
      says that the gdb it picked is not correct, which is the case since you
      don't have any reserved gdt blocks left.  This patch adds a check to make
      sure you have reserved gdt blocks to use, and if not prints out a more
      relevant error.
      Signed-off-by: NJosef Bacik <jbacik@redhat.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Andreas Dilger <adilger@sun.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      37609fd5
  2. 16 8月, 2008 1 次提交
  3. 20 8月, 2008 2 次提交
  4. 14 8月, 2008 1 次提交
  5. 20 8月, 2008 1 次提交
  6. 13 8月, 2008 31 次提交