1. 27 7月, 2010 1 次提交
  2. 30 6月, 2010 1 次提交
  3. 29 6月, 2010 2 次提交
  4. 15 6月, 2010 1 次提交
  5. 12 6月, 2010 1 次提交
    • T
      ext4: Clean up s_dirt handling · a0375156
      Theodore Ts'o 提交于
      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: N"Theodore Ts'o" <tytso@mit.edu>
      a0375156
  6. 28 5月, 2010 1 次提交
  7. 17 5月, 2010 8 次提交
  8. 06 3月, 2010 1 次提交
  9. 04 3月, 2010 1 次提交
  10. 03 3月, 2010 1 次提交
  11. 05 3月, 2010 1 次提交
    • J
      ext4: use ext4_get_block_write in buffer write · 744692dc
      Jiaying Zhang 提交于
      Allocate uninitialized extent before ext4 buffer write and
      convert the extent to initialized after io completes.
      The purpose is to make sure an extent can only be marked
      initialized after it has been written with new data so
      we can safely drop the i_mutex lock in ext4 DIO read without
      exposing stale data. This helps to improve multi-thread DIO
      read performance on high-speed disks.
      
      Skip the nobh and data=journal mount cases to make things simple for now.
      Signed-off-by: NJiaying Zhang <jiayingz@google.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      744692dc
  12. 03 3月, 2010 1 次提交
  13. 24 2月, 2010 1 次提交
  14. 17 2月, 2010 1 次提交
    • T
      percpu: add __percpu sparse annotations to fs · 003cb608
      Tejun Heo 提交于
      Add __percpu sparse annotations to fs.
      
      These annotations are to make sparse consider percpu variables to be
      in a different address space and warn if accessed without going
      through percpu accessors.  This patch doesn't affect normal builds.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Alex Elder <aelder@sgi.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      003cb608
  15. 16 2月, 2010 1 次提交
  16. 25 1月, 2010 2 次提交
  17. 15 1月, 2010 1 次提交
  18. 25 1月, 2010 1 次提交
  19. 01 1月, 2010 1 次提交
    • T
      ext4: Calculate metadata requirements more accurately · 9d0be502
      Theodore Ts'o 提交于
      In the past, ext4_calc_metadata_amount(), and its sub-functions
      ext4_ext_calc_metadata_amount() and ext4_indirect_calc_metadata_amount()
      badly over-estimated the number of metadata blocks that might be
      required for delayed allocation blocks.  This didn't matter as much
      when functions which managed the reserved metadata blocks were more
      aggressive about dropping reserved metadata blocks as delayed
      allocation blocks were written, but unfortunately they were too
      aggressive.  This was fixed in commit 0637c6f4, but as a result the
      over-estimation by ext4_calc_metadata_amount() would lead to reserving
      2-3 times the number of pending delayed allocation blocks as
      potentially required metadata blocks.  So if there are 1 megabytes of
      blocks which have been not yet been allocation, up to 3 megabytes of
      space would get reserved out of the user's quota and from the file
      system free space pool until all of the inode's data blocks have been
      allocated.
      
      This commit addresses this problem by much more accurately estimating
      the number of metadata blocks that will be required.  It will still
      somewhat over-estimate the number of blocks needed, since it must make
      a worst case estimate not knowing which physical blocks will be
      needed, but it is much more accurate than before.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      9d0be502
  20. 23 12月, 2009 1 次提交
  21. 23 1月, 2010 1 次提交
    • T
      ext4: Add block validity check when truncating indirect block mapped inodes · 1f2acb60
      Theodore Ts'o 提交于
      Add checks to ext4_free_branches() to make sure a block number found
      in an indirect block are valid before trying to free it.  If a bad
      block number is found, stop freeing the indirect block immediately,
      since the file system is corrupt and we will need to run fsck anyway.
      This also avoids spamming the logs, and specifically avoids
      driver-level "attempt to access beyond end of device" errors obscure
      what is really going on.
      
      If you get *really*, *really*, *really* unlucky, without this patch, a
      supposed indirect block containing garbage might contain a reference
      to a primary block group descriptor, in which case
      ext4_free_branches() could end up zero'ing out a block group
      descriptor block, and if then one of the block bitmaps for a block
      group described by that bg descriptor block is not in memory, and is
      read in by ext4_read_block_bitmap().  This function calls
      ext4_valid_block_bitmap(), which assumes that bg_inode_table() was
      validated at mount time and hasn't been modified since.  Since this
      assumption is no longer valid, it's possible for the value
      (ext4_inode_table(sb, desc) - group_first_block) to go negative, which
      will cause ext4_find_next_zero_bit() to trigger a kernel GPF.
      
      Addresses-Google-Bug: #2220436
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      1f2acb60
  22. 05 2月, 2010 1 次提交
  23. 09 12月, 2009 1 次提交
  24. 23 11月, 2009 1 次提交
    • T
      ext4: call ext4_forget() from ext4_free_blocks() · e6362609
      Theodore Ts'o 提交于
      Add the facility for ext4_forget() to be called from
      ext4_free_blocks().  This simplifies the code in a large number of
      places, and centralizes most of the work of calling ext4_forget() into
      a single place.
      
      Also fix a bug in the extents migration code; it wasn't calling
      ext4_forget() when releasing the indirect blocks during the
      conversion.  As a result, if the system cashed during or shortly after
      the extents migration, and the released indirect blocks get reused as
      data blocks, the journal replay would corrupt the data blocks.  With
      this new patch, fixing this bug was as simple as adding the
      EXT4_FREE_BLOCKS_FORGET flags to the call to ext4_free_blocks().
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      e6362609
  25. 22 11月, 2009 1 次提交
  26. 23 11月, 2009 1 次提交
    • T
      ext4: move ext4_forget() to ext4_jbd2.c · d6797d14
      Theodore Ts'o 提交于
      The ext4_forget() function better belongs in ext4_jbd2.c.  This will
      allow us to do some cleanup of the ext4_journal_revoke() and
      ext4_journal_forget() functions, as well as giving us better error
      reporting since we can report the caller of ext4_forget() when things
      go wrong.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      d6797d14
  27. 20 11月, 2009 1 次提交
  28. 10 11月, 2009 1 次提交
  29. 03 11月, 2009 1 次提交
    • 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
  30. 30 9月, 2009 2 次提交
    • 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