1. 02 10月, 2018 2 次提交
    • E
      ext4: add new pending reservation mechanism · 1dc0aa46
      Eric Whitney 提交于
      Add new pending reservation mechanism to help manage reserved cluster
      accounting.  Its primary function is to avoid the need to read extents
      from the disk when invalidating pages as a result of a truncate, punch
      hole, or collapse range operation.
      Signed-off-by: NEric Whitney <enwlinux@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      1dc0aa46
    • E
      ext4: generalize extents status tree search functions · ad431025
      Eric Whitney 提交于
      Ext4 contains a few functions that are used to search for delayed
      extents or blocks in the extents status tree.  Rather than duplicate
      code to add new functions to search for extents with different status
      values, such as written or a combination of delayed and unwritten,
      generalize the existing code to search for caller-specified extents
      status values.  Also, move this code into extents_status.c where it
      is better associated with the data structures it operates upon, and
      where it can be more readily used to implement new extents status tree
      functions that might want a broader scope for i_es_lock.
      
      Three missing static specifiers in RFC version of patch reported and
      fixed by Fengguang Wu <fengguang.wu@intel.com>.
      Signed-off-by: NEric Whitney <enwlinux@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      ad431025
  2. 16 9月, 2018 4 次提交
  3. 12 9月, 2018 1 次提交
  4. 04 9月, 2018 2 次提交
  5. 02 9月, 2018 2 次提交
    • T
      ext4: recalucate superblock checksum after updating free blocks/inodes · 4274f516
      Theodore Ts'o 提交于
      When mounting the superblock, ext4_fill_super() calculates the free
      blocks and free inodes and stores them in the superblock.  It's not
      strictly necessary, since we don't use them any more, but it's nice to
      keep them roughly aligned to reality.
      
      Since it's not critical for file system correctness, the code doesn't
      call ext4_commit_super().  The problem is that it's in
      ext4_commit_super() that we recalculate the superblock checksum.  So
      if we're not going to call ext4_commit_super(), we need to call
      ext4_superblock_csum_set() to make sure the superblock checksum is
      consistent.
      
      Most of the time, this doesn't matter, since we end up calling
      ext4_commit_super() very soon thereafter, and definitely by the time
      the file system is unmounted.  However, it doesn't work in this
      sequence:
      
      mke2fs -Fq -t ext4 /dev/vdc 128M
      mount /dev/vdc /vdc
      cp xfstests/git-versions /vdc
      godown /vdc
      umount /vdc
      mount /dev/vdc
      tune2fs -l /dev/vdc
      
      With this commit, the "tune2fs -l" no longer fails.
      Reported-by: NChengguang Xu <cgxu519@gmx.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      
      
      4274f516
    • T
      ext4: avoid arithemetic overflow that can trigger a BUG · bcd8e91f
      Theodore Ts'o 提交于
      A maliciously crafted file system can cause an overflow when the
      results of a 64-bit calculation is stored into a 32-bit length
      parameter.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=200623Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Reported-by: NWen Xu <wen.xu@gatech.edu>
      Cc: stable@vger.kernel.org
      bcd8e91f
  6. 27 8月, 2018 3 次提交
  7. 18 8月, 2018 2 次提交
  8. 05 8月, 2018 1 次提交
  9. 02 8月, 2018 4 次提交
  10. 30 7月, 2018 12 次提交
  11. 18 7月, 2018 1 次提交
  12. 13 7月, 2018 1 次提交
  13. 10 7月, 2018 1 次提交
  14. 09 7月, 2018 2 次提交
    • T
      ext4: clear mmp sequence number when remounting read-only · 2dca60d9
      Theodore Ts'o 提交于
      Previously, when an MMP-protected file system is remounted read-only,
      the kmmpd thread would exit the next time it woke up (a few seconds
      later), without resetting the MMP sequence number back to
      EXT4_MMP_SEQ_CLEAN.
      
      Fix this by explicitly killing the MMP thread when the file system is
      remounted read-only.
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: Andreas Dilger <adilger@dilger.ca>
      2dca60d9
    • T
      ext4: fix false negatives *and* false positives in ext4_check_descriptors() · 44de022c
      Theodore Ts'o 提交于
      Ext4_check_descriptors() was getting called before s_gdb_count was
      initialized.  So for file systems w/o the meta_bg feature, allocation
      bitmaps could overlap the block group descriptors and ext4 wouldn't
      notice.
      
      For file systems with the meta_bg feature enabled, there was a
      fencepost error which would cause the ext4_check_descriptors() to
      incorrectly believe that the block allocation bitmap overlaps with the
      block group descriptor blocks, and it would reject the mount.
      
      Fix both of these problems.
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      44de022c
  15. 03 7月, 2018 1 次提交
  16. 18 6月, 2018 1 次提交
    • T
      ext4: add more mount time checks of the superblock · bfe0a5f4
      Theodore Ts'o 提交于
      The kernel's ext4 mount-time checks were more permissive than
      e2fsprogs's libext2fs checks when opening a file system.  The
      superblock is considered too insane for debugfs or e2fsck to operate
      on it, the kernel has no business trying to mount it.
      
      This will make file system fuzzing tools work harder, but the failure
      cases that they find will be more useful and be easier to evaluate.
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: stable@kernel.org
      bfe0a5f4