]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'ext4_for_linus-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2026 16:42:02 +0000 (09:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2026 16:42:02 +0000 (09:42 -0700)
Pull ext4 updates from Ted Ts'o:

 - A major rework of the fast commit mechanism to avoid lock contention
   and deadlocks. We also export snapshot statistics in
   /proc/fs/ext4/*/fc_info

 - Performance optimization for directory hash computation by processing
   input in 4-byte chunks and removing function pointers, along with new
   KUnit tests for directory hash

 - Cleanups in JBD2 to remove special slabs and use kmalloc() instead

 - Various bug fixes, including:
     - Early validation of donor superblock in EXT4_IOC_MOVE_EXT to
       avoid cross-fs deadlock
     - Fix for a kernel BUG in ext4_write_inline_data_end under
       data=journal
     - Fix for a NULL dereference in jbd2_journal_dirty_metadata when
       handle is aborted
     - Fix for an underflow in JBD2 fast commit block initialization
       check
     - Fix for LOGFLUSH shutdown ordering to ensure ordered data
       writeback
     - Miscellaneous fixes for error path return values and KUnit
       assertions

* tag 'ext4_for_linus-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: validate donor file superblock early in EXT4_IOC_MOVE_EXT
  ext4: fix kernel BUG in ext4_write_inline_data_end
  ext4: fix ERR_PTR(0) in ext4_mkdir()
  jbd2: remove special jbd2 slabs
  ext4: remove mention of PageWriteback
  ext4: improve str2hashbuf by processing 4-byte chunks and removing function pointers
  ext4: add Kunit coverage for directory hash computation
  ext4: fast commit: export snapshot stats in fc_info
  ext4: fast commit: add lock_updates tracepoint
  ext4: fast commit: avoid i_data_sem by dropping ext4_map_blocks() in snapshots
  ext4: fast commit: avoid self-deadlock in inode snapshotting
  ext4: fast commit: avoid waiting for FC_COMMITTING
  ext4: lockdep: handle i_data_sem subclassing for special inodes
  ext4: fast commit: snapshot inode state before writing log
  jbd2: fix integer underflow in jbd2_journal_initialize_fast_commit()
  ext4: fix fast commit wait/wake bit mapping on 64-bit
  jbd2: check for aborted handle in jbd2_journal_dirty_metadata()
  ext4: Use %pe to print PTR_ERR()
  ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback
  ext4: replace KUnit tests for memcmp() with KUNIT_ASSERT_MEMEQ()

1  2 
fs/ext4/ext4.h
fs/ext4/fast_commit.c
fs/ext4/mballoc-test.c
fs/ext4/super.c
fs/jbd2/commit.c
fs/jbd2/journal.c

diff --cc fs/ext4/ext4.h
Simple merge
index 5773b85e43cbcd77e7804da7accd15a69a1b582d,4ef796b9b6cb5f9b1d8e1fcd9c3e95b1243e5721..8e2259799614e91fd183a223ec36dcdd19414d92
  
  #include <trace/events/ext4.h>
  static struct kmem_cache *ext4_fc_dentry_cachep;
+ static struct kmem_cache *ext4_fc_range_cachep;
+ /*
+  * Avoid spending unbounded time/memory snapshotting highly fragmented files
+  * under jbd2_journal_lock_updates(). If we exceed this limit, fall back to
+  * full commit.
+  */
+ #define EXT4_FC_SNAPSHOT_MAX_INODES   1024
+ #define EXT4_FC_SNAPSHOT_MAX_RANGES   2048
+ static inline void ext4_fc_set_snap_err(int *snap_err, int err)
+ {
+       if (snap_err && *snap_err == EXT4_FC_SNAP_ERR_NONE)
+               *snap_err = err;
+ }
  
 -static void ext4_end_buffer_io_sync(struct buffer_head *bh, int uptodate)
 +static void ext4_end_buffer_io_sync(struct bio *bio)
  {
 +      struct buffer_head *bh;
 +      bool uptodate = bio_endio_bh(bio, &bh);
 +
        BUFFER_TRACE(bh, "");
        if (uptodate) {
                ext4_debug("%s: Block %lld up-to-date",
Simple merge
diff --cc fs/ext4/super.c
Simple merge
Simple merge
Simple merge