From: Andreas Gruenbacher Date: Sat, 26 Jul 2025 13:09:27 +0000 (+0200) Subject: Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (4/6) X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=a07a1e46d27a75338be93ba8d4e366733ada8e9b;p=linux%2F.git Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (4/6) The current withdraw code duplicates the journal recovery code gfs2 already has for dealing with node failures, and it does so poorly. That code was added because when releasing a lockspace, we didn't have a way to indicate that the lockspace needs recovery. We now do have this feature, so the current withdraw code can be removed almost entirely. This is one of several steps towards that. Reverts parts of commit 601ef0d52e96 ("gfs2: Force withdraw to replay journals and wait for it to finish"). Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e4715e88b143..349be94810e2 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -745,8 +745,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) error = gfs2_glock_nq_num(sdp, sdp->sd_lockstruct.ls_jid, &gfs2_journal_glops, LM_ST_EXCLUSIVE, - LM_FLAG_RECOVER | - GL_NOCACHE | GL_NOPID, + LM_FLAG_RECOVER | GL_NOPID, &sdp->sd_journal_gh); if (error) { fs_err(sdp, "can't acquire journal glock: %d\n", error); @@ -821,13 +820,10 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) fail_statfs: uninit_statfs(sdp); fail_jinode_gh: - /* A withdraw may have done dq/uninit so now we need to check it */ - if (!sdp->sd_args.ar_spectator && - gfs2_holder_initialized(&sdp->sd_jinode_gh)) + if (!sdp->sd_args.ar_spectator) gfs2_glock_dq_uninit(&sdp->sd_jinode_gh); fail_journal_gh: - if (!sdp->sd_args.ar_spectator && - gfs2_holder_initialized(&sdp->sd_journal_gh)) + if (!sdp->sd_args.ar_spectator) gfs2_glock_dq_uninit(&sdp->sd_journal_gh); fail_jindex: gfs2_jindex_free(sdp);