1. 10 11月, 2009 1 次提交
    • M
      ext4: fix ext4_ext_direct_IO()'s return value after converting uninit extents · 109f5565
      Mingming 提交于
      After a direct I/O request covering an uninitalized extent (i.e.,
      created using the fallocate system call) or a hole in a file, ext4
      will convert the uninitialized extent so it is marked as initialized
      by calling ext4_convert_unwritten_extents().  This function returns
      zero on success.
      
      This return value was getting returned by ext4_direct_IO(); however
      the file system's direct_IO function is supposed to return the number
      of bytes read or written on a success.  By returning zero, it confused
      the direct I/O code into falling back to buffered I/O unnecessarily.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      109f5565
  2. 03 11月, 2009 2 次提交
    • A
      ext4: discard preallocation when restarting a transaction during truncate · fa5d1113
      Aneesh Kumar K.V 提交于
      When restart a transaction during a truncate operation, we drop and
      reacquire i_data_sem.  After reacquiring i_data_sem, we need to
      discard any inode-based preallocation that might have been grabbed
      while we released i_data_sem (for example, if pdflush is allocating
      blocks and racing against the truncate).
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      fa5d1113
    • L
      Revert "ext4: Remove journal_checksum mount option and enable it by default" · d4da6c9c
      Linus Torvalds 提交于
      This reverts commit d0646f7b, as
      requested by Eric Sandeen.
      
      It can basically cause an ext4 filesystem to miss recovery (and thus get
      mounted with errors) if the journal checksum does not match.
      
      Quoth Eric:
      
         "My hand-wavy hunch about what is happening is that we're finding a
          bad checksum on the last partially-written transaction, which is
          not surprising, but if we have a wrapped log and we're doing the
          initial scan for head/tail, and we abort scanning on that bad
          checksum, then we are essentially running an unrecovered filesystem.
      
          But that's hand-wavy and I need to go look at the code.
      
          We lived without journal checksums on by default until now, and at
          this point they're doing more harm than good, so we should revert
          the default-changing commit until we can fix it and do some good
          power-fail testing with the fixes in place."
      
      See
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=14354
      
      for all the gory details.
      Requested-by: NEric Sandeen <sandeen@redhat.com>
      Cc: Theodore Tso <tytso@mit.edu>
      Cc: Alexey Fisher <bug-track@fisher-privat.net>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Mathias Burén <mathias.buren@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d4da6c9c
  3. 03 10月, 2009 2 次提交
  4. 01 10月, 2009 2 次提交
  5. 30 9月, 2009 3 次提交
    • T
      ext4: Fix time encoding with extra epoch bits · c1fccc06
      Theodore Ts'o 提交于
      "Looking at ext4.h, I think the setting of extra time fields forgets to
      mask the epoch bits so the epoch part overwrites nsec part. The second
      change is only for coherency (2 -> EXT4_EPOCH_BITS)."
      
      Thanks to Damien Guibouret for pointing out this problem.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c1fccc06
    • T
      ext4: Use tracepoints for mb_history trace file · 296c355c
      Theodore Ts'o 提交于
      The /proc/fs/ext4/<dev>/mb_history was maintained manually, and had a
      number of problems: it required a largish amount of memory to be
      allocated for each ext4 filesystem, and the s_mb_history_lock
      introduced a CPU contention problem.  
      
      By ripping out the mb_history code and replacing it with ftrace
      tracepoints, and we get more functionality: timestamps, event
      filtering, the ability to correlate mballoc history with other ext4
      tracepoints, etc.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      296c355c
    • T
      ext4, jbd2: Drop unneeded printks at mount and unmount time · 90576c0b
      Theodore Ts'o 提交于
      There are a number of kernel printk's which are printed when an ext4
      filesystem is mounted and unmounted.  Disable them to economize space
      in the system logs.  In addition, disabling the mballoc stats by
      default saves a number of unneeded atomic operations for every block
      allocation or deallocation.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      90576c0b
  6. 29 9月, 2009 1 次提交
  7. 30 9月, 2009 1 次提交
  8. 29 9月, 2009 6 次提交
  9. 30 9月, 2009 1 次提交
    • T
      ext4: Adjust ext4_da_writepages() to write out larger contiguous chunks · 55138e0b
      Theodore Ts'o 提交于
      Work around problems in the writeback code to force out writebacks in
      larger chunks than just 4mb, which is just too small.  This also works
      around limitations in the ext4 block allocator, which can't allocate
      more than 2048 blocks at a time.  So we need to defeat the round-robin
      characteristics of the writeback code and try to write out as many
      blocks in one inode before allowing the writeback code to move on to
      another inode.  We add a a new per-filesystem tunable,
      max_writeback_mb_bump, which caps this to a default of 128mb per
      inode.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      55138e0b
  10. 28 9月, 2009 2 次提交
  11. 27 9月, 2009 1 次提交
  12. 22 9月, 2009 2 次提交
  13. 21 9月, 2009 1 次提交
  14. 17 9月, 2009 9 次提交
  15. 16 9月, 2009 1 次提交
    • A
      HWPOISON: Enable .remove_error_page for migration aware file systems · aa261f54
      Andi Kleen 提交于
      Enable removing of corrupted pages through truncation
      for a bunch of file systems: ext*, xfs, gfs2, ocfs2, ntfs
      These should cover most server needs.
      
      I chose the set of migration aware file systems for this
      for now, assuming they have been especially audited.
      But in general it should be safe for all file systems
      on the data area that support read/write and truncate.
      
      Caveat: the hardware error handler does not take i_mutex
      for now before calling the truncate function. Is that ok?
      
      Cc: tytso@mit.edu
      Cc: hch@infradead.org
      Cc: mfasheh@suse.com
      Cc: aia21@cantab.net
      Cc: hugh.dickins@tiscali.co.uk
      Cc: swhiteho@redhat.com
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      aa261f54
  16. 15 9月, 2009 1 次提交
  17. 14 9月, 2009 1 次提交
  18. 12 9月, 2009 1 次提交
    • T
      ext4: Fix initalization of s_flex_groups · 7ad9bb65
      Theodore Ts'o 提交于
      The s_flex_groups array should have been initialized using atomic_add
      to sum up the free counts from the block groups that make up a
      flex_bg.  By using atomic_set, the value of the s_flex_groups array
      was set to the values of the last block group in the flex_bg.  
      
      The impact of this bug is that the block and inode allocation
      algorithms might not pick the best flex_bg for new allocation.
      
      Thanks to Damien Guibouret for pointing out this problem!
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      7ad9bb65
  19. 11 9月, 2009 2 次提交