1. 05 Aug, 2010 3 commits
    • Aditya Kali's avatar
      ext4: Adding error check after calling ext4_mb_regular_allocator() · 6c7a120a
      Aditya Kali authored
      If the bitmap block on disk is bad, ext4_mb_load_buddy() returns an
      error. This error is returned to the caller,
      ext4_mb_regular_allocator() and then to ext4_mb_new_blocks().  But
      ext4_mb_new_blocks() did not check for the return value of
      ext4_mb_regular_allocator() and would repeatedly try to load the
      bitmap block. The fix simply catches the return value and exits out of
      the 'repeat' loop after cleanup.
      
      We also take the opportunity to clean up the error handling in
      ext4_mb_new_blocks().
      
      Google-Bug-Id: 2853530
      Signed-off-by: default avatarAditya Kali <adityakali@google.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      6c7a120a
    • Jan Kara's avatar
      ext4: Fix dirtying of journalled buffers in data=journal mode · 56d35a4c
      Jan Kara authored
      In data=journal mode, we still use block_write_begin() to prepare
      page for writing. This function can occasionally mark buffer dirty
      which violates journalling assumptions - when a buffer is part of
      a transaction, it should be dirty and a buffer can be already part
      of a forget list of some transaction when block_write_begin()
      gets called. This violation of journalling assumptions then results
      in "JBD: Spotted dirty metadata buffer..." warnings.
      
      In fact, temporary dirtying the buffer while the page is still locked
      does not really cause problems to the journalling because we won't write
      the buffer until the page gets unlocked. So we just have to make sure
      to clear dirty bits before unlocking the page.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      56d35a4c
    • Eric Sandeen's avatar
      ext4: re-inline ext4_rec_len_(to|from)_disk functions · 0cfc9255
      Eric Sandeen authored
      commit 3d0518f4, "ext4: New rec_len encoding for very
      large blocksizes" made several changes to this path, but from
      a perf perspective, un-inlining ext4_rec_len_from_disk() seems
      most significant.  This function is called from ext4_check_dir_entry(),
      which on a file-creation workload is called extremely often.
      
      I tested this with bonnie:
      
      # bonnie++ -u root -s 0 -f -x 200 -d /mnt/test -n 32
      
      (this does 200 iterations) and got this for the file creations:
      
      ext4 stock:   Average =  21206.8 files/s
      ext4 inlined: Average =  22346.7 files/s  (+5%)
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      0cfc9255
  2. 04 Aug, 2010 2 commits
  3. 02 Aug, 2010 2 commits
  4. 01 Aug, 2010 2 commits
  5. 29 Jul, 2010 1 commit
  6. 27 Jul, 2010 21 commits
  7. 29 Jun, 2010 4 commits
  8. 15 Jun, 2010 1 commit
  9. 14 Jun, 2010 3 commits
  10. 12 Jun, 2010 1 commit
    • Theodore Ts'o's avatar
      ext4: Clean up s_dirt handling · a0375156
      Theodore Ts'o authored
      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: default avatar"Theodore Ts'o" <tytso@mit.edu>
      a0375156