1. 30 4月, 2012 2 次提交
  2. 21 3月, 2012 1 次提交
  3. 20 3月, 2012 1 次提交
  4. 21 2月, 2012 1 次提交
    • L
      ext4: fix resize when resizing within single group · a0ade1de
      Lukas Czerner 提交于
      When resizing file system in the way that the new size of the file
      system is still in the same group (no new groups are added), then we can
      hit a BUG_ON in ext4_alloc_group_tables()
      
      BUG_ON(flex_gd->count == 0 || group_data == NULL);
      
      because flex_gd->count is zero. The reason is the missing check for such
      case, so the code always extend the last group fully and then attempt to
      add more groups, but at that time n_blocks_count is actually smaller
      than o_blocks_count.
      
      It can be easily reproduced like this:
      
      mkfs.ext4 -b 4096 /dev/sda 30M
      mount /dev/sda /mnt/test
      resize2fs /dev/sda 50M
      
      Fix this by checking whether the resize happens within the singe group
      and only add that many blocks into the last group to satisfy user
      request. Then o_blocks_count == n_blocks_count and the resize will exit
      successfully without and attempt to add more groups into the fs.
      
      Also fix mixing together block number and blocks count which might be
      confusing and can easily lead to off-by-one errors (but it is actually
      not the case here since the two occurrence of this mix-up will cancel
      each other).
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Reported-by: NMilan Broz <mbroz@redhat.com>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a0ade1de
  5. 05 1月, 2012 3 次提交
  6. 04 1月, 2012 9 次提交
  7. 10 9月, 2011 3 次提交
  8. 01 8月, 2011 1 次提交
  9. 31 7月, 2011 1 次提交
  10. 28 7月, 2011 3 次提交
  11. 27 7月, 2011 7 次提交
  12. 21 3月, 2011 1 次提交
  13. 22 2月, 2011 1 次提交
    • T
      ext4: fix compile warnings with EXT4FS_DEBUG enabled · da488945
      Theodore Ts'o 提交于
      Compile 2.6.38-rc1 with turning EXT4FS_DEBUG on,
      we get following compile warnings. This patch fixes them.
      
        CC      fs/ext4/hash.o
        CC      fs/ext4/resize.o
      fs/ext4/resize.c: In function 'setup_new_group_blocks':
      fs/ext4/resize.c:233:2: warning: format '%#04llx' expects type 'long long
      unsigned int', but argument 3 has type 'long unsigned int'
      fs/ext4/resize.c:251:2: warning: format '%#04llx' expects type 'long long
      unsigned int', but argument 3 has type 'long unsigned int'
        CC      fs/ext4/extents.o
        CC      fs/ext4/ext4_jbd2.o
        CC      fs/ext4/migrate.o
      Reported-by: NAkira Fujita <a-fujita@rs.jp.nec.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      da488945
  14. 11 1月, 2011 1 次提交
  15. 24 12月, 2010 1 次提交
  16. 28 10月, 2010 2 次提交
  17. 15 6月, 2010 1 次提交
  18. 12 6月, 2010 1 次提交
    • T
      ext4: Clean up s_dirt handling · a0375156
      Theodore Ts'o 提交于
      We don't need to set s_dirt in most of the ext4 code when journaling
      is enabled.  In ext3/4 some of the summary statistics for # of free
      inodes, blocks, and directories are calculated from the per-block
      group statistics when the file system is mounted or unmounted.  As a
      result the superblock doesn't have to be updated, either via the
      journal or by setting s_dirt.  There are a few exceptions, most
      notably when resizing the file system, where the superblock needs to
      be modified --- and in that case it should be done as a journalled
      operation if possible, and s_dirt set only in no-journal mode.
      
      This patch will optimize out some unneeded disk writes when using ext4
      with a journal.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a0375156