Skip to content

Commit a07a1e4

Browse files
author
Andreas Gruenbacher
committed
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 601ef0d ("gfs2: Force withdraw to replay journals and wait for it to finish"). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 4cee5b0 commit a07a1e4

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

fs/gfs2/ops_fstype.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
745745
error = gfs2_glock_nq_num(sdp, sdp->sd_lockstruct.ls_jid,
746746
&gfs2_journal_glops,
747747
LM_ST_EXCLUSIVE,
748-
LM_FLAG_RECOVER |
749-
GL_NOCACHE | GL_NOPID,
748+
LM_FLAG_RECOVER | GL_NOPID,
750749
&sdp->sd_journal_gh);
751750
if (error) {
752751
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)
821820
fail_statfs:
822821
uninit_statfs(sdp);
823822
fail_jinode_gh:
824-
/* A withdraw may have done dq/uninit so now we need to check it */
825-
if (!sdp->sd_args.ar_spectator &&
826-
gfs2_holder_initialized(&sdp->sd_jinode_gh))
823+
if (!sdp->sd_args.ar_spectator)
827824
gfs2_glock_dq_uninit(&sdp->sd_jinode_gh);
828825
fail_journal_gh:
829-
if (!sdp->sd_args.ar_spectator &&
830-
gfs2_holder_initialized(&sdp->sd_journal_gh))
826+
if (!sdp->sd_args.ar_spectator)
831827
gfs2_glock_dq_uninit(&sdp->sd_journal_gh);
832828
fail_jindex:
833829
gfs2_jindex_free(sdp);

0 commit comments

Comments
 (0)