1. 10 Jun, 2009 1 commit
  2. 09 Jun, 2009 1 commit
  3. 08 Jun, 2009 1 commit
    • Toshiyuki Okajima's avatar
      ext4: fix dx_map_entry to support 256k directory blocks · 9aee2286
      Toshiyuki Okajima authored
      The dx_map_entry structure doesn't support over 64KB block size by
      current usage of its member("offs"). Because "offs" treats an offset
      of copies of the ext4_dir_entry_2 structure as is. This member size is
      16 bits. But real offset for over 64KB(256KB) block size needs 18
      bits. However, real offset keeps 4 byte boundary, so lower 2 bits is
      not used.
      
      Therefore, we do the following to fix this limitation:
      For "store": 
      	we divide the real offset by 4 and then store this result to "offs" 
      	member.
      For "use":
      	we multiply "offs" member by 4 and then use this result 
      	as real offset.
      Signed-off-by: default avatarToshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      9aee2286
  4. 05 Jun, 2009 2 commits
  5. 04 Jun, 2009 1 commit
  6. 09 Jun, 2009 1 commit
    • Jan Kara's avatar
      ext4: Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle() · 03f5d8bc
      Jan Kara authored
      Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle(). This
      seems to be a relict from some old days and setting disksize in this
      function does not make much sense.  Currently it was set only by
      ext4_getblk().  Since the parameter has some effect only if create ==
      1, it is easy to check by grepping through the sources that the three
      callers which end up calling ext4_getblk() with create == 1
      (ext4_append, ext4_quota_write, ext4_mkdir) do the right thing and set
      disksize themselves.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      03f5d8bc
  7. 03 Jun, 2009 1 commit
  8. 09 Jun, 2009 1 commit
  9. 25 May, 2009 2 commits
  10. 18 May, 2009 4 commits
  11. 17 May, 2009 1 commit
    • Theodore Ts'o's avatar
      ext4: Add a comprehensive block validity check to ext4_get_blocks() · 6fd058f7
      Theodore Ts'o authored
      To catch filesystem bugs or corruption which could lead to the
      filesystem getting severly damaged, this patch adds a facility for
      tracking all of the filesystem metadata blocks by contiguous regions
      in a red-black tree.  This allows quick searching of the tree to
      locate extents which might overlap with filesystem metadata blocks.
      
      This facility is also used by the multi-block allocator to assure that
      it is not allocating blocks out of the system zone, as well as by the
      routines used when reading indirect blocks and extents information
      from disk to make sure their contents are valid.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      6fd058f7
  12. 14 May, 2009 2 commits
  13. 12 May, 2009 1 commit
  14. 14 May, 2009 3 commits
    • Theodore Ts'o's avatar
      ext4: Add documentation to the ext4_*get_block* functions · b920c755
      Theodore Ts'o authored
      This adds more documentation to various internal functions in
      fs/ext4/inode.c, most notably ext4_ind_get_blocks(),
      ext4_da_get_block_write(), ext4_da_get_block_prep(),
      ext4_normal_get_block_write().
      
      In addition, the static function ext4_normal_get_block_write() has
      been renamed noalloc_get_block_write(), since it is used in many
      places far beyond ext4_normal_writepage().
      
      Plenty of warnings have been added to the noalloc_get_block_write()
      function, since the way it is used is amazingly fragile.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      b920c755
    • Theodore Ts'o's avatar
      ext4: Define a new set of flags for ext4_get_blocks() · c2177057
      Theodore Ts'o authored
      The functions ext4_get_blocks(), ext4_ext_get_blocks(), and
      ext4_ind_get_blocks() used an ad-hoc set of integer variables used as
      boolean flags passed in as arguments.  Use a single flags parameter
      and a setandard set of bitfield flags instead.  This saves space on
      the call stack, and it also makes the code a bit more understandable.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      c2177057
    • Theodore Ts'o's avatar
      ext4: Rename ext4_get_blocks_wrap() to be ext4_get_blocks() · 12b7ac17
      Theodore Ts'o authored
      Another function rename for clarity's sake.  The _wrap prefix simply
      confuses people, and didn't add much people trying to follow the code
      paths.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      12b7ac17
  15. 12 May, 2009 2 commits
  16. 15 May, 2009 1 commit
  17. 03 May, 2009 1 commit
  18. 02 May, 2009 2 commits
  19. 13 May, 2009 1 commit
  20. 03 May, 2009 1 commit
  21. 02 May, 2009 1 commit
  22. 01 May, 2009 2 commits
  23. 03 May, 2009 1 commit
  24. 01 May, 2009 2 commits
    • Theodore Ts'o's avatar
      ext4: Move the ext4_i.h header file into ext4.h · d444c3c3
      Theodore Ts'o authored
      There is no longer a reason for a separate ext4_i.h header file, so
      move it into ext4.h just to make life easier for developers to find
      the relevant data structures and typedefs.  Should also speed up
      compiles slightly, too.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      d444c3c3
    • Theodore Ts'o's avatar
      ext4: Don't avoid using BLOCK_UNINIT block groups in mballoc · 75507efb
      Theodore Ts'o authored
      By avoiding the use of not-yet-used block groups (i.e., block groups
      with the BLOCK_UNINIT flag), mballoc had a tendency to create large
      files with large non-contiguous gaps.  In addition avoiding the use of
      new block groups had a tendency to push regular file data into the
      first block group in a flex_bg group, which slows down the speed of
      e2fsck pass 2, since it has a tendency to seek much more.  For
      example:
      
                     Before Patch                       After Patch
                    Time in seconds                   Time in seconds
                  Real /  User/  Sys   MB/s      Real /  User/  Sys    MB/s
      Pass 1      8.52 / 2.21 / 0.46  20.43      8.84 / 4.97 / 1.11   19.68
      Pass 2     21.16 / 1.02 / 1.86  11.30      6.54 / 1.77 / 1.78   36.39
      Pass 3      0.01 / 0.00 / 0.00 139.00      0.01 / 0.01 / 0.00  128.90
      Pass 4      0.16 / 0.15 / 0.00   0.00      0.17 / 0.17 / 0.00    0.00
      Pass 5      2.52 / 1.99 / 0.09   0.79      2.31 / 1.78 / 0.06    0.86
      Total      32.40 / 5.11 / 2.49  12.81     17.99 / 8.75 / 2.98   23.01
      
      This was on a sample 80 gig root filesystem which was approximately
      50% full.  Note the improved e2fsck pass 2 performance, by over a
      factor of 3, due to a decreased number of seeks.  (The total amount of
      I/O in pass 2 was unchanged; the layout of the directory blocks was
      simply much better from e2fsck's's perspective.)
      
      Other changes as a result of this patch on this sample filesystem:
      
                                   Before Patch    After Patch
      # of non-contig files           762             779
      # of non-contig directories     571             570
      # of BLOCK_UNINIT bg's          307             293
      # of INODE_UNINIT bg's          503             503
      
      Out of 640 block groups, of which 333 were in use, this patch caused
      an extra 14 block groups to be utilized.  The number of non-contiguous
      files did go up slightly, but when measured against the 99.9% of the
      files (603,154) which were contiguously allocated, this is pretty
      insignificant.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: default avatarAndreas Dilger <adilger@sun.com>
      75507efb
  25. 26 Apr, 2009 2 commits
  26. 01 May, 2009 1 commit
    • Theodore Ts'o's avatar
      ext4: ext4_mark_recovery_complete() doesn't need to use lock_super · a63c9eb2
      Theodore Ts'o authored
      The function ext4_mark_recovery_complete() is called from two call
      paths: either (a) while mounting the filesystem, in which case there's
      no danger of any other CPU calling write_super() until the mount is
      completed, and (b) while remounting the filesystem read-write, in
      which case the fs core has already locked the superblock.  This also
      allows us to take out a very vile unlock_super()/lock_super() pair in
      ext4_remount().
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      a63c9eb2
  27. 25 Apr, 2009 1 commit