summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2025-07-29 15:22:35 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2025-11-26 23:52:27 +0000
commit406058184c593857d4512a5c58cc51b42d8eb87f (patch)
tree7c3f22d4d64fa7fb90c88ca23f5fb1c413c0e1c7
parenta07a1e46d27a75338be93ba8d4e366733ada8e9b (diff)
Revert "gfs2: Force withdraw to replay journals and wait for it to finish" (5/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 <agruenba@redhat.com>
-rw-r--r--fs/gfs2/glock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index c420838248be..1eb637f6cf70 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -691,8 +691,7 @@ __acquires(&gl->gl_lockref.lock)
struct lm_lockstruct *ls = &sdp->sd_lockstruct;
int ret;
- if (target != LM_ST_UNLOCKED && glock_blocked_by_withdraw(gl) &&
- gh && !(gh->gh_flags & LM_FLAG_RECOVER))
+ if (target != LM_ST_UNLOCKED && glock_blocked_by_withdraw(gl))
goto skip_inval;
GLOCK_BUG_ON(gl, gl->gl_state == target);
@@ -1548,7 +1547,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
struct gfs2_glock *gl = gh->gh_gl;
int error;
- if (glock_blocked_by_withdraw(gl) && !(gh->gh_flags & LM_FLAG_RECOVER))
+ if (glock_blocked_by_withdraw(gl))
return -EIO;
if (gh->gh_flags & GL_NOBLOCK) {