1 From 666b3d803a511fbc9bc5e5ea8ce66010cf03ea13 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <Trond.Myklebust@netapp.com>
3 Date: Tue, 19 Feb 2013 12:04:42 -0500
4 Subject: NLM: Ensure that we resend all pending blocking locks after a reclaim
6 From: Trond Myklebust <Trond.Myklebust@netapp.com>
8 commit 666b3d803a511fbc9bc5e5ea8ce66010cf03ea13 upstream.
10 Currently, nlmclnt_lock will break out of the for(;;) loop when
11 the reclaimer wakes up the blocking lock thread by setting
12 nlm_lck_denied_grace_period. This causes the lock request to fail
14 The intention was always to ensure that we resend the lock request
15 after the grace period has expired.
17 Reported-by: Wangyuan Zhang <Wangyuan.Zhang@netapp.com>
18 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 fs/lockd/clntproc.c | 3 +++
23 1 file changed, 3 insertions(+)
25 --- a/fs/lockd/clntproc.c
26 +++ b/fs/lockd/clntproc.c
27 @@ -551,6 +551,9 @@ again:
28 status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
31 + /* Resend the blocking lock request after a server reboot */
32 + if (resp->status == nlm_lck_denied_grace_period)
34 if (resp->status != nlm_lck_blocked)