1. 29 1月, 2008 2 次提交
    • A
      ext4: add ext4_group_t, and change all group variables to this type. · fd2d4291
      Avantika Mathur 提交于
      In many places variables for block group are of type int, which limits the
      maximum number of block groups to 2^31.  Each block group can have up to
      2^15 blocks, with a 4K block size,  and the max filesystem size is limited to
      2^31 * (2^15 * 2^12) = 2^58  -- or 256 PB
      
      This patch introduces a new type ext4_group_t, of type unsigned long, to
      represent block group numbers in ext4.
      All occurrences of block group variables are converted to type ext4_group_t.
      Signed-off-by: NAvantika Mathur <mathur@us.ibm.com>
      fd2d4291
    • A
      ext4: Introduce ext4_lblk_t · 725d26d3
      Aneesh Kumar K.V 提交于
      This patch adds a new data type ext4_lblk_t to represent
      the logical file blocks.
      
      This is the preparatory patch to support large files in ext4
      The follow up patch with convert the ext4_inode i_blocks to
      represent the number of blocks in file system block size. This
      changes makes it possible to have a block number 2**32 -1 which
      will result in overflow if the block number is represented by
      signed long. This patch convert all the block number to type
      ext4_lblk_t which is typedef to __u32
      
      Also remove dead code ext4_ext_walk_space
      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: NEric Sandeen <sandeen@redhat.com>
      725d26d3
  2. 18 10月, 2007 3 次提交
  3. 17 10月, 2007 1 次提交
  4. 20 7月, 2007 1 次提交
    • M
      fix ext4/JBD2 build warnings · b38bd33a
      Mingming Cao 提交于
      Looking at the current linus-git tree jbd_debug() define in
      include/linux/jbd2.h
      
      extern u8 journal_enable_debug;
      
      #define jbd_debug(n, f, a...)                                           \
              do {                                                            \
                      if ((n) <= journal_enable_debug) {                      \
                              printk (KERN_DEBUG "(%s, %d): %s: ",            \
                                      __FILE__, __LINE__, __FUNCTION__);      \
                              printk (f, ## a);                               \
                      }                                                       \
              } while (0)
      > fs/ext4/inode.c: In function ‘ext4_write_inode’:
      > fs/ext4/inode.c:2906: warning: comparison is always true due to limited
      > range of data type
      >
      > fs/jbd2/recovery.c: In function ‘jbd2_journal_recover’:
      > fs/jbd2/recovery.c:254: warning: comparison is always true due to
      > limited range of data type
      > fs/jbd2/recovery.c:257: warning: comparison is always true due to
      > limited range of data type
      >
      > fs/jbd2/recovery.c: In function ‘jbd2_journal_skip_recovery’:
      > fs/jbd2/recovery.c:301: warning: comparison is always true due to
      > limited range of data type
      >
      Noticed all warnings are occurs when the debug level is 0. Then found
      the "jbd2: Move jbd2-debug file to debugfs" patch
      http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f49d5d019afa4e94253bfc92f0daca3badb990b
      
      changed the jbd2_journal_enable_debug from int type to u8, makes the
      jbd_debug comparision is always true when the debugging level is 0. Thus
      the compile warning occurs.
      
      Thought about changing the jbd2_journal_enable_debug data type back to
      int, but can't, because the jbd2-debug is moved to debug fs, where
      calling debugfs_create_u8() to create the debugfs entry needs the value
      to be u8 type.
      
      Even if we changed the data type back to int, the code is still buggy,
      kernel should not print jbd2 debug message if the
      jbd2_journal_enable_debug is set to 0. But this is not the case.
      
      The fix is change the level of debugging to 1. The same should fixed in
      ext3/JBD, but currently ext3 jbd-debug via /proc fs is broken, so we
      probably should fix it all together.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Theodore Tso <tytso@mit.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b38bd33a
  5. 18 7月, 2007 5 次提交
  6. 24 6月, 2007 1 次提交
  7. 01 6月, 2007 1 次提交
  8. 09 5月, 2007 2 次提交
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
    • M
      ext2/3/4: fix file date underflow on ext2 3 filesystems on 64 bit systems · 4d7bf11d
      Markus Rechberger 提交于
      Taken from http://bugzilla.kernel.org/show_bug.cgi?id=5079
      
      signed long ranges from -2.147.483.648 to 2.147.483.647 on x86 32bit
      
      10000011110110100100111110111101 .. -2,082,844,739
      10000011110110100100111110111101 ..  2,212,122,557 <- this currently gets
      stored on the disk but when converting it to a 64bit signed long value it loses
      its sign and becomes positive.
      
      Cc: Andreas Dilger <adilger@dilger.ca>
      Cc: <linux-ext4@vger.kernel.org>
      
      Andreas says:
      
      This patch is now treating timestamps with the high bit set as negative
      times (before Jan 1, 1970).  This means we lose 1/2 of the possible range
      of timestamps (lopping off 68 years before unix timestamp overflow -
      now only 30 years away :-) to handle the extremely rare case of setting
      timestamps into the distant past.
      
      If we are only interested in fixing the underflow case, we could just
      limit the values to 0 instead of storing negative values.  At worst this
      will skew the timestamp by a few hours for timezones in the far east
      (files would still show Jan 1, 1970 in "ls -l" output).
      
      That said, it seems 32-bit systems (mine at least) allow files to be set
      into the past (01/01/1907 works fine) so it seems this patch is bringing
      the x86_64 behaviour into sync with other kernels.
      
      On the plus side, we have a patch that is ready to add nanosecond timestamps
      to ext3 and as an added bonus adds 2 high bits to the on-disk timestamp so
      this extends the maximum date to 2242.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d7bf11d
  9. 03 4月, 2007 1 次提交
  10. 12 2月, 2007 1 次提交
  11. 09 12月, 2006 1 次提交
  12. 08 12月, 2006 1 次提交
  13. 12 10月, 2006 10 次提交
  14. 01 10月, 2006 1 次提交
  15. 27 9月, 2006 4 次提交
  16. 17 9月, 2006 1 次提交
    • S
      [PATCH] ext3 sequential read regression fix · 20acaa18
      Suparna Bhattacharya 提交于
      ext3-get-blocks support caused ~20% degrade in Sequential read
      performance (tiobench). Problem is with marking the buffer boundary
      so IO can be submitted right away. Here is the patch to fix it.
      
        2.6.18-rc6:
        -----------
        # ./iotest
        1048576+0 records in
        1048576+0 records out
        4294967296 bytes (4.3 GB) copied, 75.2726 seconds, 57.1 MB/s
      
        real    1m15.285s
        user    0m0.276s
        sys     0m3.884s
      
        2.6.18-rc6 + fix:
        -----------------
        [root@elm3a241 ~]# ./iotest
        1048576+0 records in
        1048576+0 records out
        4294967296 bytes (4.3 GB) copied, 62.9356 seconds, 68.2 MB/s
      
      The boundary block check in ext3_get_blocks_handle needs to be adjusted
      against the count of blocks mapped in this call, now that it can map
      more than one block.
      Signed-off-by: NSuparna Bhattacharya <suparna@in.ibm.com>
      Tested-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      20acaa18
  17. 09 9月, 2006 1 次提交
    • B
      [PATCH] ext3_getblk() should handle HOLE correctly · 3665d0e5
      Badari Pulavarty 提交于
      It has been reported that ext3_getblk() is not doing the right thing and
      triggering following WARN():
      
      BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
       <c01c5140> ext3_getblk+0x98/0x2a6  <c03b2806> md_wakeup_thread+0x26/0x2a
       <c01c536d> ext3_bread+0x1f/0x88  <c01cedf9> ext3_quota_read+0x136/0x1ae
       <c018b683> v1_read_dqblk+0x61/0xac  <c0188f32> dquot_acquire+0xf6/0x107
       <c01ceaba> ext3_acquire_dquot+0x46/0x68  <c01897d4> dqget+0x155/0x1e7
       <c018a97b> dquot_transfer+0x3e0/0x3e9  <c016fe52> dput+0x23/0x13e
       <c01c7986> ext3_setattr+0xc3/0x240  <c0120f66> current_fs_time+0x52/0x6a
       <c017320e> notify_change+0x2bd/0x30d  <c0159246> chown_common+0x9c/0xc5
       <c02a222c> strncpy_from_user+0x3b/0x68  <c0167fe6> do_path_lookup+0xdf/0x266
       <c016841b> __user_walk_fd+0x44/0x5a  <c01592b9> sys_chown+0x4a/0x55
       <c015a43c> vfs_write+0xe7/0x13c  <c01695d4> sys_mkdir+0x1f/0x23
       <c0102a97> syscall_call+0x7/0xb
      
      Looking at the code, it looks like it's not handle HOLE correctly.  It ends
      up returning -EIO.  Here is the patch to fix it.
      
      If we really want to be paranoid, we can allow return values 0 (HOLE), 1
      (we asked for one block) and return -EIO for more than 1 block.  But I
      really don't see a reason for doing it - all we need is the block# here.
      (doesn't matter how many blocks are mapped).
      
      ext3_get_blocks_handle() returns number of blocks it mapped.  It returns 0
      in case of HOLE.  ext3_getblk() should handle HOLE properly (currently its
      dumping warning stack and returning -EIO).
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3665d0e5
  18. 01 8月, 2006 2 次提交
  19. 29 6月, 2006 1 次提交