Commit a07a1e46 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

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 601ef0d5 ("gfs2: Force withdraw to replay
journals and wait for it to finish").

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 4cee5b0f
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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);