linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] some refactor of __ext4_fill_super()
@ 2022-08-30 12:03 Jason Yan
  2022-08-30 12:03 ` [PATCH 01/13] ext4: goto right label 'failed_mount3a' Jason Yan
                   ` (12 more replies)
  0 siblings, 13 replies; 31+ messages in thread
From: Jason Yan @ 2022-08-30 12:03 UTC (permalink / raw)
  To: tytso, adilger.kernel, jack, ritesh.list, lczerner, linux-ext4; +Cc: Jason Yan

This function is maybe the longest function I have seen in the kernel.
It has more than one thousand lines. This makes us not easy to read and
understand the code. So I made some refactors. The first two patches did
some preparation to the goto labels so that we can factor out some
functions easily.

After this refactor this function is about 500 lines shorter. I did not
go further because I'm not sure if people like this kind of change. If
there is any bad side effects, please let me know. If you strongly
dislike it, I am ok to stop this refactor.

Thansk.

Jason Yan (13):
  ext4: goto right label 'failed_mount3a'
  ext4: remove cantfind_ext4 error handler
  ext4: factor out ext4_set_def_opts()
  ext4: factor out ext4_handle_clustersize()
  ext4: factor out ext4_fast_commit_init()
  ext4: factor out ext4_inode_info_init()
  ext4: factor out ext4_encoding_init()
  ext4: factor out ext4_handle_csum()
  ext4: factor out ext4_compat_feature_check()
  ext4: factor out ext4_geometry_check()
  ext4: factor out ext4_group_desc_init() and ext4_group_desc_free()
  ext4: factor out ext4_load_and_init_journal()
  ext4: factor out ext4_journal_data_check()

 fs/ext4/super.c | 1070 ++++++++++++++++++++++++++---------------------
 1 file changed, 599 insertions(+), 471 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2022-09-01  7:59 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 12:03 [PATCH 00/13] some refactor of __ext4_fill_super() Jason Yan
2022-08-30 12:03 ` [PATCH 01/13] ext4: goto right label 'failed_mount3a' Jason Yan
2022-08-31 11:36   ` Jan Kara
2022-08-30 12:04 ` [PATCH 02/13] ext4: remove cantfind_ext4 error handler Jason Yan
2022-08-31 11:41   ` Jan Kara
2022-09-01  7:42     ` Jason Yan
2022-08-30 12:04 ` [PATCH 03/13] ext4: factor out ext4_set_def_opts() Jason Yan
2022-08-31 11:44   ` Jan Kara
2022-08-30 12:04 ` [PATCH 04/13] ext4: factor out ext4_handle_clustersize() Jason Yan
2022-08-31 11:46   ` Jan Kara
2022-08-30 12:04 ` [PATCH 05/13] ext4: factor out ext4_fast_commit_init() Jason Yan
2022-08-31 11:47   ` Jan Kara
2022-08-30 12:04 ` [PATCH 06/13] ext4: factor out ext4_inode_info_init() Jason Yan
2022-08-31 11:49   ` Jan Kara
2022-08-30 12:04 ` [PATCH 07/13] ext4: factor out ext4_encoding_init() Jason Yan
2022-08-31 11:50   ` Jan Kara
2022-08-30 12:04 ` [PATCH 08/13] ext4: factor out ext4_handle_csum() Jason Yan
2022-08-31 11:52   ` Jan Kara
2022-09-01  7:56     ` Jason Yan
2022-08-30 12:04 ` [PATCH 09/13] ext4: factor out ext4_compat_feature_check() Jason Yan
2022-08-31 11:55   ` Jan Kara
2022-09-01  7:58     ` Jason Yan
2022-08-30 12:04 ` [PATCH 10/13] ext4: factor out ext4_geometry_check() Jason Yan
2022-08-31 11:57   ` Jan Kara
2022-08-30 12:04 ` [PATCH 11/13] ext4: factor out ext4_group_desc_init() and ext4_group_desc_free() Jason Yan
2022-08-31 12:00   ` Jan Kara
2022-08-30 12:04 ` [PATCH 12/13] ext4: factor out ext4_load_and_init_journal() Jason Yan
2022-08-31 12:05   ` Jan Kara
2022-08-30 12:04 ` [PATCH 13/13] ext4: factor out ext4_journal_data_check() Jason Yan
2022-08-31 12:06   ` Jan Kara
2022-09-01  7:59     ` Jason Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).