Skip to contentSkip to conversation

NLM: Ensure that we resend all pending blocking locks after a reclaim

PATCH New Trond Myklebust 1 participant 1 message Feb 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NLM: Ensure that we resend all pending blocking locks after a reclaim

Currently, nlmclnt_lock will break out of the for(;;) loop when the reclaimer wakes up the blocking lock thread by setting nlm_lck_denied_grace_period. This causes the lock request to fail with an ENOLCK error.
The intention was always to ensure that we resend the lock request after the grace period has expired.

---
 fs/lockd/clntproc.c | 3 +++
 1 file changed, 3 insertions(+)
fs/lockd/clntproc.c +3 -0
index 54f9e6c..52e5120 100644
@@ -550,6 +550,9 @@ again:
 		status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
 		if (status < 0)
 			break;
+		/* Resend the blocking lock request after a server reboot */
+		if (resp->status ==  nlm_lck_denied_grace_period)
+			continue;
 		if (resp->status != nlm_lck_blocked)
 			break;
 	}
Signature · 1 line
1.8.1.2