1. 30 Apr, 2008 2 commits
    • Solofo Ramangalahy's avatar
      ext4: update ctime and mtime for truncate with extents. · ef737728
      Solofo Ramangalahy authored
      The recently announced "Linux POSIX file system test suite"
      caught a truncate issue when using extents:
      mtime and ctime are not updated when truncate is successful.
      
      This is the single issue caught with "default" ext4 (mkfs and mount
      with minimal options).
      The testsuite does not report failure with -o noextents.
      
      With the following patch, all tests of the testsuite pass.
      Signed-off-by: default avatarSolofo Ramangalahy <Solofo.Ramangalahy@bull.net>
      Signed-off-by: Mingming Cao <cmm@us.ibm.com> 
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      ef737728
    • Aneesh Kumar K.V's avatar
      ext4: Don't do GFP_NOFS allocations after taking ext4_lock_group · c83617db
      Aneesh Kumar K.V authored
      We can't do GFP_NOFS allocation after taking ext4_lock_group
      
      BUG: sleeping function called from invalid context at mm/slab.c:3054
      in_atomic():1, irqs_disabled():0
      1 lock held by vi/2426:
      #0:  (&ei->i_data_sem){----}, at: [<c01cf665>] ext4_release_file+0x23/0x66
      Pid: 2426, comm: vi Not tainted 2.6.25-rc7 #24
      [<c011a3dc>] __might_sleep+0xbe/0xc5
      [<c01620c9>] kmem_cache_alloc+0x22/0xa6
      [<c01e382a>] ext4_mb_release_inode_pa+0x73/0x1b3
      [<c01e6adf>] ext4_mb_discard_inode_preallocations+0x22d/0x2d4
      [<c013000a>] ? param_set_ushort+0x32/0x39
      [<c01ceba1>] ext4_discard_reservation+0x27/0x6a
      [<c01cf66c>] ext4_release_file+0x2a/0x66
      [<c0165bd6>] __fput+0xae/0x155
      [<c0165e46>] fput+0x17/0x19
      [<c0163756>] filp_close+0x50/0x5a
      [<c01647c0>] sys_close+0x71/0xad
      [<c0104aba>] sysenter_past_esp+0x5f/0xa5
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      c83617db
  2. 29 Apr, 2008 1 commit
  3. 30 Apr, 2008 3 commits
  4. 17 Apr, 2008 2 commits
  5. 30 Apr, 2008 1 commit
  6. 17 Apr, 2008 3 commits
  7. 28 Apr, 2008 1 commit
  8. 29 Apr, 2008 1 commit
  9. 17 Apr, 2008 8 commits
  10. 29 Apr, 2008 1 commit
    • Eric Sandeen's avatar
      ext4: reduce mballoc stack usage with noinline_for_stack · 4ddfef7b
      Eric Sandeen authored
      mballoc.c is a whole lot of static functions, which gcc seems to
      really like to inline.
      
      With the changes below, on x86, I can at least get from:
      
      432 ext4_mb_new_blocks
      240 ext4_mb_free_blocks
      208 ext4_mb_discard_group_preallocations
      188 ext4_mb_seq_groups_show
      164 ext4_mb_init_cache
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      ...
      
      to
      
      220 ext4_mb_free_blocks
      188 ext4_mb_seq_groups_show
      176 ext4_mb_regular_allocator
      164 ext4_mb_init_cache
      156 ext4_mb_new_blocks
      152 ext4_mb_release_inode_pa
      136 ext4_mb_seq_history_show
      124 ext4_mb_release_group_pa
      ...
      
      which still has some big functions in there, but not 432 bytes!
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      4ddfef7b
  11. 30 Apr, 2008 2 commits
  12. 29 Apr, 2008 4 commits
  13. 17 Apr, 2008 1 commit
  14. 29 Apr, 2008 5 commits
  15. 17 Apr, 2008 1 commit
  16. 30 Apr, 2008 1 commit
  17. 17 Apr, 2008 1 commit
    • Hisashi Hifumi's avatar
      ext4: fdatasync should skip metadata writeout when overwriting · 53c550e9
      Hisashi Hifumi authored
      Currently fdatasync is identical to fsync in ext3.
      
      I think fdatasync should skip journal flush in data=ordered and
      data=writeback mode when it overwrites to already-instantiated blocks on
      HDD.  When I_DIRTY_DATASYNC flag is not set, fdatasync should skip journal
      writeout because this indicates only atime or/and mtime updates.
      
      Following patch is the same approach of ext2's fsync code(ext2_sync_file).
      
      I did a performance test using the sysbench.
      
      #sysbench --num-threads=128 --max-requests=50000 --test=fileio --file-total-size=128G
      --file-test-mode=rndwr --file-fsync-mode=fdatasync run
      
      The result on ext3 was:
      
      	-2.6.24
      	Operations performed:  0 Read, 50080 Write, 59600 Other = 109680 Total
      	Read 0b  Written 782.5Mb  Total transferred 782.5Mb  (12.116Mb/sec)
      	  775.45 Requests/sec executed
      
      	Test execution summary:
      	    total time:                          64.5814s
      	    total number of events:              50080
      	    total time taken by event execution: 3713.9836
      	    per-request statistics:
      	         min:                            0.0000s
      	         avg:                            0.0742s
      	         max:                            0.9375s
      	         approx.  95 percentile:         0.2901s
      
      	Threads fairness:
      	    events (avg/stddev):           391.2500/23.26
      	    execution time (avg/stddev):   29.0155/1.99
      
      	-2.6.24-patched
      	Operations performed:  0 Read, 50009 Write, 61596 Other = 111605 Total
      	Read 0b  Written 781.39Mb  Total transferred 781.39Mb  (16.419Mb/sec)
      	1050.83 Requests/sec executed
      
      	Test execution summary:
      	    total time:                          47.5900s
      	    total number of events:              50009
      	    total time taken by event execution: 2934.5768
      	    per-request statistics:
       	         min:                            0.0000s
      	         avg:                            0.0587s
       	         max:                            0.8938s
      	         approx.  95 percentile:         0.1993s
      
      	Threads fairness:
      	    events (avg/stddev):           390.6953/22.64
      	    execution time (avg/stddev):   22.9264/1.17
      
      Filesystem I/O throughput was improved.
      
      Signed-off-by :Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      53c550e9
  18. 30 Apr, 2008 1 commit
  19. 17 Apr, 2008 1 commit
    • Josef Bacik's avatar
      jbd2: fix possible journal overflow issues · 1dfc3220
      Josef Bacik authored
      There are several cases where the running transaction can get buffers
      added to its BJ_Metadata list which it never dirtied, which makes its
      t_nr_buffers counter end up larger than its t_outstanding_credits
      counter.
      
      This will cause issues when starting new transactions as while we are
      logging buffers we decrement t_outstanding_buffers, so when
      t_outstanding_buffers goes negative, we will report that we need less
      space in the journal than we actually need, so transactions will be
      started even though there may not be enough room for them.  In the worst
      case scenario (which admittedly is almost impossible to reproduce) this
      will result in the journal running out of space.
      
      The fix is to only refile buffers from the committing transaction to the
      running transactions BJ_Modified list when b_modified is set on that
      journal, which is the only way to be sure if the running transaction has
      modified that buffer.
      
      This patch also fixes an accounting error in journal_forget, it is
      possible that we can call journal_forget on a buffer without having
      modified it, only gotten write access to it, so instead of freeing a
      credit, we only do so if the buffer was modified.  The assert will help
      catch if this problem occurs.  Without these two patches I could hit
      this assert within minutes of running postmark, with them this issue no
      longer arises.
      
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      1dfc3220