1. 10 7月, 2012 1 次提交
    • T
      ext4: fix overhead calculation used by ext4_statfs() · 952fc18e
      Theodore Ts'o 提交于
      Commit f975d6bc introduced bug which caused ext4_statfs() to
      miscalculate the number of file system overhead blocks.  This causes
      the f_blocks field in the statfs structure to be larger than it should
      be.  This would in turn cause the "df" output to show the number of
      data blocks in the file system and the number of data blocks used to
      be larger than they should be.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      952fc18e
  2. 29 5月, 2012 2 次提交
  3. 30 4月, 2012 4 次提交
  4. 21 3月, 2012 1 次提交
  5. 20 3月, 2012 1 次提交
  6. 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
  7. 05 1月, 2012 3 次提交
  8. 04 1月, 2012 9 次提交
  9. 10 9月, 2011 3 次提交
  10. 01 8月, 2011 1 次提交
  11. 31 7月, 2011 1 次提交
  12. 28 7月, 2011 3 次提交
  13. 27 7月, 2011 7 次提交
  14. 21 3月, 2011 1 次提交
  15. 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
  16. 11 1月, 2011 1 次提交