[PATCH v3 00/16] some refactor of __ext4_fill_super()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

v2->v3:
  Patch #7 define a null function when CONFIG_UNICODE is not enabled.
  Add patch #14~16 to unify super block loading and move DIOREAD_NOLOCK
      setting to ext4_set_def_opts().
  Add some reviewed-by tags from Ritesh.

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

Jason Yan (16):
  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()
  ext4: unify the ext4 super block loading operation
  ext4: remove useless local variable 'blocksize'
  ext4: move DIOREAD_NOLOCK setting to ext4_set_def_opts()

 fs/ext4/super.c | 1213 ++++++++++++++++++++++++++---------------------
 1 file changed, 685 insertions(+), 528 deletions(-)

-- 
2.31.1




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux