Skip to content

Commit 41ad1f7

Browse files
author
Andreas Gruenbacher
committed
Revert "gfs2: Check for log write errors before telling dlm to unlock"
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 the rest of d93ae38 ("gfs2: Check for log write errors before telling dlm to unlock"). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 6bb7c1b commit 41ad1f7

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

fs/gfs2/glock.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -725,22 +725,6 @@ __acquires(&gl->gl_lockref.lock)
725725
spin_lock(&gl->gl_lockref.lock);
726726

727727
skip_inval:
728-
/*
729-
* Check for an error encountered since we called go_sync and go_inval.
730-
* If so, we can't withdraw from the glock code because the withdraw
731-
* code itself uses glocks (see function signal_our_withdraw) to
732-
* change the mount to read-only. Most importantly, we must not call
733-
* dlm to unlock the glock until the journal is in a known good state
734-
* (after journal replay) otherwise other nodes may use the object
735-
* (rgrp or dinode) and then later, journal replay will corrupt the
736-
* file system. The best we can do here is wait for the logd daemon
737-
* to see sd_log_error and withdraw, and in the meantime, requeue the
738-
* work for later.
739-
*
740-
* However, if we're just unlocking the lock (say, for unmount, when
741-
* gfs2_gl_hash_clear calls clear_glock) and recovery is complete
742-
* then it's okay to tell dlm to unlock it.
743-
*/
744728
if (glock_blocked_by_withdraw(gl) && target != LM_ST_UNLOCKED) {
745729
request_demote(gl, LM_ST_UNLOCKED, 0, false);
746730
/*

0 commit comments

Comments
 (0)