Skip to content

rewrite error handling during mounting stage

Heming Zhao via Ocfs2-devel ocfs2-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 7 repliesIn review
  2. v25 patches 9 repliesSuperseded
  3. v15 patches 17 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ocfs2: fix mounting crash if journal is not allocedfs/ocfs2/inode.c fs/ocfs2/journal.c fs/ocfs2/journal.h +1 more+42 -121 reply
2/5ocfs2: change return type of ocfs2_resmap_initfs/ocfs2/reservations.c fs/ocfs2/reservations.h fs/ocfs2/super.c+4 -151 reply
3/5ocfs2: ocfs2_initialize_super does cleanup job before return errorfs/ocfs2/super.c+41 -183 replies
4/5ocfs2: ocfs2_mount_volume does cleanup job before return errorfs/ocfs2/super.c+23 -121 reply
5/5ocfs2: rewrite error handling of ocfs2_fill_superfs/ocfs2/super.c+32 -351 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchJoseph Qi
1/5R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Ocfs2-devel] [PATCH v3 0/5] rewrite error handling during mounting stage

Note:
For test code & test result, please check my next patch.

** v3 **

patch 1/5
in fs/ocfs2/journal.h, add declaration for ocfs2_journal_alloc() in ocfs2_journal_init(), add BUG_ON()
in ocfs2_initialize_super()
- change the "if()" condition for return value of ocfs2_journal_alloc
- remove unused variable 'journal', which introduced from v1 patch but became unused from v2 after new api ocfs2_journal_alloc().

patch 4/5
- Under review comment, roll back the changes [*] for ocfs2_check_volume().
- add ocfs2_free_slot_info() in label out_system_inodes. without call this function, ocfs2 will trigger crash. this crash triggered by my test patch.

[*]: new comment at front of function, and a code rule fix

** v2 **

patch 1/5:
- change patch subject.
- add a new function ocfs2_journal_alloc
- add new comment at front of ocfs2_journal_alloc
- in ocfs2_initialize_super, change legacy comment before calling ocfs2_journal_alloc.

patch 2/5:
- revise commit log according review comment.
- remove meanless comment of ocfs2_resmap_init in header file.

patch 3/5:
- set "sb->s_fs_info = NULL" (osb is NULL) when ocfs2_initialize_super fails.

patch 4/5:
for ocfs2_mount_volume():
- make it return 0 (before return "status") as successful.
- remove goto label "out_journal_shutdown"
- add more clean job in label "out_system_inodes"
- add ocfs2_shutdown_local_alloc() to release local alloc resources.
- add ocfs2_journal_shutdown() to clean up journal.

for ocfs2_check_volume():
- add new comment at the front of ocfs2_check_volume.
- change comment style/format for "struct ocfs2_dinode *local_alloc"

patch 5/5:
revise commit log.

in ocfs2_fill_super():
- change goto label "out_journal" to "out_dismount"
- add "goto out" in label "out_dismount".

** draft -> v1 **

- split one patch into 5 patches.
- goto labal name change to out_xxx style.
- only test for mount/umount & 0001-xx.patch related issue.

Heming Zhao (5):
ocfs2: fix mounting crash if journal is not alloced
ocfs2: change return type of ocfs2_resmap_init
ocfs2: ocfs2_initialize_super does cleanup job before return error
ocfs2: ocfs2_mount_volume does cleanup job before return error
ocfs2: rewrite error handling of ocfs2_fill_super

 fs/ocfs2/inode.c        |   4 +-
 fs/ocfs2/journal.c      |  33 +++++---
 fs/ocfs2/journal.h      |   2 +
 fs/ocfs2/reservations.c |   4 +-
 fs/ocfs2/reservations.h |   9 +-
 fs/ocfs2/super.c        | 178 ++++++++++++++++++++++++----------------
 6 files changed, 139 insertions(+), 91 deletions(-)
Signature · 7 lines
2.35.1


_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel