Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Jun 2023 20:18:36 +0000 (13:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Jun 2023 20:18:36 +0000 (13:18 -0700)
Pull ext4 updates from Ted Ts'o:
 "Various cleanups and bug fixes in ext4's extent status tree,
  journalling, and block allocator subsystems.

  Also improve performance for parallel DIO overwrites"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (55 commits)
  ext4: avoid updating the superblock on a r/o mount if not needed
  jbd2: skip reading super block if it has been verified
  ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
  ext4: refactoring to use the unified helper ext4_quotas_off()
  ext4: turn quotas off if mount failed after enabling quotas
  ext4: update doc about journal superblock description
  ext4: add journal cycled recording support
  jbd2: continue to record log between each mount
  jbd2: remove j_format_version
  jbd2: factor out journal initialization from journal_get_superblock()
  jbd2: switch to check format version in superblock directly
  jbd2: remove unused feature macros
  ext4: ext4_put_super: Remove redundant checking for 'sbi->s_journal_bdev'
  ext4: Fix reusing stale buffer heads from last failed mounting
  ext4: allow concurrent unaligned dio overwrites
  ext4: clean up mballoc criteria comments
  ext4: make ext4_zeroout_es() return void
  ext4: make ext4_es_insert_extent() return void
  ext4: make ext4_es_insert_delayed_block() return void
  ext4: make ext4_es_remove_extent() return void
  ...

1  2 
fs/ext4/ext4.h
fs/ext4/file.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/super.c
fs/jbd2/journal.c

diff --cc fs/ext4/ext4.h
Simple merge
diff --cc fs/ext4/file.c
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/ext4/ioctl.c
index 961284cc9b65cc9012441d0bc9eb088d2224922b,55be1b8a63608ebb23510a8c66001ba13ab03307..331859511f80fa9f47e3c196c08406bb347e055e
@@@ -793,10 -793,18 +793,11 @@@ static int ext4_ioctl_setproject(struc
  }
  #endif
  
 -static int ext4_shutdown(struct super_block *sb, unsigned long arg)
 +int ext4_force_shutdown(struct super_block *sb, u32 flags)
  {
        struct ext4_sb_info *sbi = EXT4_SB(sb);
 -      __u32 flags;
+       int ret;
  
 -      if (!capable(CAP_SYS_ADMIN))
 -              return -EPERM;
 -
 -      if (get_user(flags, (__u32 __user *)arg))
 -              return -EFAULT;
 -
        if (flags > EXT4_GOING_FLAGS_NOLOGFLUSH)
                return -EINVAL;
  
diff --cc fs/ext4/super.c
index eaa5858d5285dd762a8e7dc67ce6706c0eb71fe0,c638b0db3b2bc9040b12e32f2b1c49f4f14aa3ae..c94ebf704616e5289b5a10eacddecf8f6c9862a7
@@@ -1133,7 -1128,13 +1133,13 @@@ static void ext4_blkdev_remove(struct e
        struct block_device *bdev;
        bdev = sbi->s_journal_bdev;
        if (bdev) {
 -              ext4_blkdev_put(bdev);
+               /*
+                * Invalidate the journal device's buffers.  We don't want them
+                * floating about in memory - the physical journal device may
+                * hotswapped, and it breaks the `ro-after' testing code.
+                */
+               invalidate_bdev(bdev);
 +              blkdev_put(bdev, sbi->s_sb);
                sbi->s_journal_bdev = NULL;
        }
  }
Simple merge