All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] some refactor of __ext4_fill_super()
@ 2022-09-03  3:01 Jason Yan
  2022-09-03  3:01 ` [PATCH v2 01/13] ext4: goto right label 'failed_mount3a' Jason Yan
                   ` (12 more replies)
  0 siblings, 13 replies; 30+ messages in thread
From: Jason Yan @ 2022-09-03  3:01 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.

v1->v2: 
  some code improvements suggested by Jan Kara and add review tags.

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_init_metadata_csum()
  ext4: factor out ext4_check_feature_compatibility()
  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_mode_check()

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

-- 
2.31.1


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

end of thread, other threads:[~2022-09-12  3:13 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03  3:01 [PATCH v2 00/13] some refactor of __ext4_fill_super() Jason Yan
2022-09-03  3:01 ` [PATCH v2 01/13] ext4: goto right label 'failed_mount3a' Jason Yan
2022-09-08  8:39   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 02/13] ext4: remove cantfind_ext4 error handler Jason Yan
2022-09-08  8:40   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 03/13] ext4: factor out ext4_set_def_opts() Jason Yan
2022-09-08  8:44   ` Ritesh Harjani (IBM)
2022-09-12  2:20     ` Jason Yan
2022-09-03  3:01 ` [PATCH v2 04/13] ext4: factor out ext4_handle_clustersize() Jason Yan
2022-09-08  8:45   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 05/13] ext4: factor out ext4_fast_commit_init() Jason Yan
2022-09-08  8:45   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 06/13] ext4: factor out ext4_inode_info_init() Jason Yan
2022-09-08  8:46   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 07/13] ext4: factor out ext4_encoding_init() Jason Yan
2022-09-08  8:56   ` Ritesh Harjani (IBM)
2022-09-12  2:30     ` Jason Yan
2022-09-12  3:12       ` Jason Yan
2022-09-03  3:01 ` [PATCH v2 08/13] ext4: factor out ext4_init_metadata_csum() Jason Yan
2022-09-08  8:57   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 09/13] ext4: factor out ext4_check_feature_compatibility() Jason Yan
2022-09-08  8:58   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 10/13] ext4: factor out ext4_geometry_check() Jason Yan
2022-09-08  9:00   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 11/13] ext4: factor out ext4_group_desc_init() and ext4_group_desc_free() Jason Yan
2022-09-08  9:03   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 12/13] ext4: factor out ext4_load_and_init_journal() Jason Yan
2022-09-08  9:04   ` Ritesh Harjani (IBM)
2022-09-03  3:01 ` [PATCH v2 13/13] ext4: factor out ext4_journal_data_mode_check() Jason Yan
2022-09-08  9:06   ` Ritesh Harjani (IBM)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.