Skip to content

Commit b14c949

Browse files
committed
Revert "gfs2: Don't demote a glock until its revokes are written"
This reverts commit df5db5f. This patch fixes a regression: patch df5db5f allowed function run_queue() to bypass its call to do_xmote() if revokes were queued for the glock. That's wrong because its call to do_xmote() is what is responsible for calling the go_sync() glops functions to sync both the ail list and any revokes queued for it. By bypassing the call, gfs2 could get into a stand-off where the glock could not be demoted until its revokes are written back, but the revokes would not be written back because do_xmote() was never called. It "sort of" works, however, because there are other mechanisms like the log flush daemon (logd) that can sync the ail items and revokes, if it deems it necessary. The problem is: without file system pressure, it might never deem it necessary. Signed-off-by: Bob Peterson <[email protected]>
1 parent b11e1a8 commit b14c949

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/gfs2/glock.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,6 @@ __acquires(&gl->gl_lockref.lock)
723723
goto out_unlock;
724724
if (nonblock)
725725
goto out_sched;
726-
smp_mb();
727-
if (atomic_read(&gl->gl_revokes) != 0)
728-
goto out_sched;
729726
set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags);
730727
GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE);
731728
gl->gl_target = gl->gl_demote_state;

0 commit comments

Comments
 (0)