1. 27 9月, 2006 4 次提交
    • E
      [PATCH] fix ext3 mounts at 16T · 855565e8
      Eric Sandeen 提交于
      I need to do some actual IO testing now, but this gets things mounting for
      a 16T ext3 filesystem.  (patched up e2fsprogs is needed too, I'll send that
      off the kernel list)
      
      This patch fixes these issues in the kernel:
      
      o sbi->s_groups_count overflows in ext3_fill_super()
      
      	sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -
      			       le32_to_cpu(es->s_first_data_block) +
      			       EXT3_BLOCKS_PER_GROUP(sb) - 1) /
      			      EXT3_BLOCKS_PER_GROUP(sb);
      
        at 16T, s_blocks_count is already maxed out; adding
        EXT3_BLOCKS_PER_GROUP(sb) overflows it and groups_count comes out to 0.
        Not really what we want, and causes a failed mount.
      
        Feel free to check my math (actually, please do!), but changing it this
        way should work & avoid the overflow:
      
        (A + B - 1)/B changed to: ((A - 1)/B) + 1
      
      o ext3_check_descriptors() overflows range checks
      
        ext3_check_descriptors() iterates over all block groups making sure
        that various bits are within the right block ranges...  on the last pass
        through, it is checking the error case
      
         [item] >= block + EXT3_BLOCKS_PER_GROUP(sb)
      
        where "block" is the first block in the last block group.  The last
        block in this group (and the last one that will fit in 32 bits) is block
        + EXT3_BLOCKS_PER_GROUP(sb)- 1.  block + EXT3_BLOCKS_PER_GROUP(sb) wraps
        back around to 0.
      
        so, make things clearer with "first_block" and "last_block" where those
        are first and last, inclusive, and use <, > rather than <, >=.
      
        Finally, the last block group may be smaller than the rest, so account
        for this on the last pass through: last_block = sb->s_blocks_count - 1;
      
      (a similar patch could be done for ext2; does anyone in their right mind
      use ext2 at 16T?  I'll send an ext2 patch doing the same thing if that's
      warranted)
      Signed-off-by: NEric Sandeen <esandeen@redhat.com>
      Cc: Mingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      855565e8
    • A
      2aed3484
    • M
      [PATCH] ext3 and jbd cleanup: remove whitespace · ae6ddcc5
      Mingming Cao 提交于
      Remove whitespace from ext3 and jbd, before we clone ext4.
      
      Signed-off-by: Mingming Cao<cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ae6ddcc5
    • J
      [PATCH] jbd: add lock annotation to jbd_sync_bh · e7ab8d65
      Josh Triplett 提交于
      jbd_sync_bh releases journal->j_list_lock.  Add a lock annotation to this
      function so that sparse can check callers for lock pairing, and so that
      sparse will not complain about this function since it intentionally uses
      the lock in this manner.
      Signed-off-by: NJosh Triplett <josh@freedesktop.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e7ab8d65
  2. 26 9月, 2006 13 次提交
  3. 25 9月, 2006 23 次提交