Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH v2 00/12] ext4,jbd2: cleanup journal load and initialization process
@ 2023-08-10  8:54 Zhang Yi
  2023-08-10  8:54 ` [PATCH v2 01/12] jbd2: move load_superblock() dependent functions Zhang Yi
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: Zhang Yi @ 2023-08-10  8:54 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, adilger.kernel, jack, yi.zhang, yi.zhang, yukuai3

From: Zhang Yi <yi.zhang@huawei.com>

v1->v2:
 - Fix the changelog in patch 1 and 2.
 - Simplify the comments for local functions in patch 6.
 - Remove the incorrect zero fast_commit blocks check in patch 7.
 - Fix a UAF problem in patch 11.

Hello,

This patch set cleanup the journal load and initialization process
(discussed and suggested by Ted in [1]). Firstly, move reading of the
journal superblock from jbd2_journal_load() and jbd2_journal_wipe()
early to journal_init_common(), and completely drop the kludgy call of
journal_get_superblock() in jbd2_journal_check_used_features(). Then
cleanup the ext4_get_journal() and ext4_get_dev_journal(), making their
initialization process and error handling process more clear, and return
proper errno if some bad happens. Finally rename those two functions to
jbd2_open_{dev,inode}_journal. This patch set has passed
'kvm-xfstests -g auto'.

[1] https://lore.kernel.org/linux-ext4/20230617185057.GA343628@mit.edu/

Thanks,
Yi.

Zhang Yi (12):
  jbd2: move load_superblock() dependent functions
  jbd2: move load_superblock() into journal_init_common()
  jbd2: don't load superblock in jbd2_journal_check_used_features()
  jbd2: checking valid features early in journal_get_superblock()
  jbd2: open code jbd2_verify_csum_type() helper
  jbd2: cleanup load_superblock()
  jbd2: add fast_commit space check
  jbd2: cleanup journal_init_common()
  jbd2: drop useless error tag in jbd2_journal_wipe()
  jbd2: jbd2_journal_init_{dev,inode} return proper error return value
  ext4: cleanup ext4_get_dev_journal() and ext4_get_journal()
  ext4: ext4_get_{dev}_journal return proper error value

 fs/ext4/super.c    | 154 ++++++++-------
 fs/jbd2/journal.c  | 465 +++++++++++++++++++++------------------------
 fs/ocfs2/journal.c |   8 +-
 3 files changed, 299 insertions(+), 328 deletions(-)

-- 
2.34.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-10 10:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  8:54 [PATCH v2 00/12] ext4,jbd2: cleanup journal load and initialization process Zhang Yi
2023-08-10  8:54 ` [PATCH v2 01/12] jbd2: move load_superblock() dependent functions Zhang Yi
2023-08-10  8:54 ` [PATCH v2 02/12] jbd2: move load_superblock() into journal_init_common() Zhang Yi
2023-08-10  8:54 ` [PATCH v2 03/12] jbd2: don't load superblock in jbd2_journal_check_used_features() Zhang Yi
2023-08-10  8:54 ` [PATCH v2 04/12] jbd2: checking valid features early in journal_get_superblock() Zhang Yi
2023-08-10  8:54 ` [PATCH v2 05/12] jbd2: open code jbd2_verify_csum_type() helper Zhang Yi
2023-08-10  8:54 ` [PATCH v2 06/12] jbd2: cleanup load_superblock() Zhang Yi
2023-08-10 10:02   ` Jan Kara
2023-08-10  8:54 ` [PATCH v2 07/12] jbd2: add fast_commit space check Zhang Yi
2023-08-10 10:10   ` Jan Kara
2023-08-10  8:54 ` [PATCH v2 08/12] jbd2: cleanup journal_init_common() Zhang Yi
2023-08-10  8:54 ` [PATCH v2 09/12] jbd2: drop useless error tag in jbd2_journal_wipe() Zhang Yi
2023-08-10  8:54 ` [PATCH v2 10/12] jbd2: jbd2_journal_init_{dev,inode} return proper error return value Zhang Yi
2023-08-10  8:54 ` [PATCH v2 11/12] ext4: cleanup ext4_get_dev_journal() and ext4_get_journal() Zhang Yi
2023-08-10 10:20   ` Jan Kara
2023-08-10  8:54 ` [PATCH v2 12/12] ext4: ext4_get_{dev}_journal return proper error value Zhang Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox