]> Gentwo Git Trees - linux/.git/commitdiff
Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (4/6)
authorAndreas Gruenbacher <agruenba@redhat.com>
Sat, 26 Jul 2025 13:09:27 +0000 (15:09 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 26 Nov 2025 23:52:27 +0000 (23:52 +0000)
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 <agruenba@redhat.com>
fs/gfs2/ops_fstype.c

index e4715e88b1432970e1b3ffe23390a9bf1a9d6cc1..349be94810e2b7ed29a23162dee0139a8074606a 100644 (file)
@@ -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);