Skip to content

gfs2 filesystem withdrawal rework

Andreas Gruenbacher gfs2 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24gfs2: Add clean argument to lm_unmount hookfs/gfs2/glock.h fs/gfs2/lock_dlm.c fs/gfs2/ops_fstype.c +1 more+15 -50 replies
2/24gfs2: Asynchronous withdrawfs/gfs2/incore.h fs/gfs2/ops_fstype.c fs/gfs2/super.c +2 more+37 -250 replies
3/24gfs2: Get rid of delayed withdrawsfs/gfs2/glock.c fs/gfs2/glops.c fs/gfs2/incore.h +5 more+16 -740 replies
4/24gfs2: Rename gfs2_{withdrawing_or_ => }withdrawnfs/gfs2/aops.c fs/gfs2/file.c fs/gfs2/glock.c +12 more+42 -430 replies
5/24gfs2: Withdraw immediately on log write errorsfs/gfs2/glock.c fs/gfs2/log.c+2 -140 replies
6/24gfs2: Kill gfs2_io_error_bh_wdfs/gfs2/log.c fs/gfs2/lops.c fs/gfs2/meta_io.c +2 more+10 -220 replies
7/24gfs2: Rename LM_FLAG_{NOEXP -> RECOVER}fs/gfs2/glock.c fs/gfs2/glock.h fs/gfs2/ops_fstype.c +3 more+22 -190 replies
8/24Revert "gfs2: don't stop reads while withdraw in progress"fs/gfs2/incore.h fs/gfs2/meta_io.c fs/gfs2/sys.c +2 more+6 -220 replies
9/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (1/6)fs/gfs2/glock.c fs/gfs2/incore.h fs/gfs2/ops_fstype.c +2 more+1 -360 replies
10/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (2/6)fs/gfs2/glock.c fs/gfs2/glops.c fs/gfs2/incore.h +3 more+0 -380 replies
11/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (3/6)fs/gfs2/glops.c fs/gfs2/incore.h fs/gfs2/lock_dlm.c +1 more+0 -860 replies
12/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (4/6)fs/gfs2/ops_fstype.c+3 -70 replies
13/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (5/6)fs/gfs2/glock.c+2 -30 replies
14/24Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (6/6)fs/gfs2/util.c+3 -1240 replies
15/24Revert "gfs2: fix a deadlock on withdraw-during-mount"fs/gfs2/glock.c+18 -350 replies
16/24Revert "gfs2: Check for log write errors before telling dlm to unlock"fs/gfs2/glock.c+0 -160 replies
17/24Revert "gfs2: Allow some glocks to be used during withdraw"fs/gfs2/glock.c fs/gfs2/glops.c fs/gfs2/incore.h +1 more+6 -460 replies
18/24Revert "gfs2: fix infinite loop when checking ail item count before go_inval"fs/gfs2/glock.c fs/gfs2/glops.c+4 -160 replies
19/24gfs2: Rename gfs2_{gl_dq_holders => withdraw_glocks}fs/gfs2/glock.c fs/gfs2/glock.h fs/gfs2/util.c+5 -50 replies
20/24gfs2: Clean up properly during a withdrawfs/gfs2/glock.c+46 -371 reply
21/24gfs2: New gfs2_withdraw_helperfs/gfs2/incore.h fs/gfs2/ops_fstype.c fs/gfs2/super.c +2 more+90 -280 replies
22/24gfs2: Withdraw immediately in gfs2_trans_add_metafs/gfs2/trans.c+1 -40 replies
23/24gfs2: No longer thaw filesystems during a withdrawfs/gfs2/super.c fs/gfs2/super.h fs/gfs2/util.c+0 -220 replies
24/24gfs2: Clean up SDF_JOURNAL_LIVE flag handlingfs/gfs2/lops.c fs/gfs2/trans.c fs/gfs2/util.c+33 -360 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/24] gfs2 filesystem withdrawal rework

When an unrecoverable filesystem error occurs, the "errors" mount option determines whether the filesystem should trigger a kernel panic or withdraw the filesystem. In a production environment, triggering a kernel panic is usually recommended as that should lead to eventual node recovery. Filesystem withdrawal will disable the failed filesystem but leave the rest of the node running; this can be useful for debugging.

Conceptually, the "errors" setting should make no difference for the rest of the cluster and in either case, the remaining nodes should recover the journal of the failed node before resuming operation.

Up until recently, dlm didn't have a way of leaving a lockspace in an inconsistent state and triggering recovery, though. The withdrawing node had to carefully release just the dlm locks needed for recovery, wait for the other nodes to perform recovery, and only then could it release the remaining dlm locks. We ended up with two implementations of the same concept, and the filesystem withdrawal code was causing various problems all over the place.

Since dlm merge a769648f464c in v6.18-rc1, gfs2 can indicate that recovery is needed when leaving a lockspace. This allows the existing filesystem withdrawal code to be removed almost entirely. We can now trigger withdrawal in any context and complete it asynchronously.

Thanks,
Andreas

Andreas Gruenbacher (24):
gfs2: Add clean argument to lm_unmount hook
gfs2: Asynchronous withdraw
gfs2: Get rid of delayed withdraws
gfs2: Rename gfs2_{withdrawing_or_ => }withdrawn
gfs2: Withdraw immediately on log write errors
gfs2: Kill gfs2_io_error_bh_wd
gfs2: Rename LM_FLAG_{NOEXP -> RECOVER}
Revert "gfs2: don't stop reads while withdraw in progress"
Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (1/6) Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (2/6) Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (3/6) Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (4/6) Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (5/6) Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (6/6) Revert "gfs2: fix a deadlock on withdraw-during-mount"
Revert "gfs2: Check for log write errors before telling dlm to unlock" Revert "gfs2: Allow some glocks to be used during withdraw"
Revert "gfs2: fix infinite loop when checking ail item count before go_inval"
gfs2: Rename gfs2_{gl_dq_holders => withdraw_glocks}
gfs2: Clean up properly during a withdraw
gfs2: New gfs2_withdraw_helper
gfs2: Withdraw immediately in gfs2_trans_add_meta
gfs2: No longer thaw filesystems during a withdraw
gfs2: Clean up SDF_JOURNAL_LIVE flag handling

 fs/gfs2/aops.c       |   2 +-
 fs/gfs2/file.c       |   2 +-
 fs/gfs2/glock.c      | 204 ++++++++-------------------
 fs/gfs2/glock.h      |  12 +-
 fs/gfs2/glops.c      |  95 ++-----------
 fs/gfs2/incore.h     |  22 +--
 fs/gfs2/lock_dlm.c   |  57 +++-----
 fs/gfs2/log.c        |  59 +++-----
 fs/gfs2/lops.c       |   7 +-
 fs/gfs2/meta_io.c    |  13 +-
 fs/gfs2/ops_fstype.c |  35 +++--
 fs/gfs2/quota.c      |   8 +-
 fs/gfs2/recovery.c   |   8 +-
 fs/gfs2/super.c      |  31 ++--
 fs/gfs2/super.h      |   1 -
 fs/gfs2/sys.c        |  34 ++---
 fs/gfs2/trace_gfs2.h |   1 -
 fs/gfs2/trans.c      |  30 ++--
 fs/gfs2/util.c       | 328 +++++++++++++++----------------------------
 fs/gfs2/util.h       |  56 ++------
 20 files changed, 302 insertions(+), 703 deletions(-)
Signature · 1 line
2.51.0