]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.7/nfsv4-fix-lock-recovery-when-create_session-setclientid_confirm-fails.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.7 / nfsv4-fix-lock-recovery-when-create_session-setclientid_confirm-fails.patch
1 From a4339b7b686b4acc8b6de2b07d7bacbe3ae44b83 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <trond.myklebust@primarydata.com>
3 Date: Sat, 27 Sep 2014 17:02:26 -0400
4 Subject: NFSv4: Fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
5
6 From: Trond Myklebust <trond.myklebust@primarydata.com>
7
8 commit a4339b7b686b4acc8b6de2b07d7bacbe3ae44b83 upstream.
9
10 If a NFSv4.x server returns NFS4ERR_STALE_CLIENTID in response to a
11 CREATE_SESSION or SETCLIENTID_CONFIRM in order to tell us that it rebooted
12 a second time, then the client will currently take this to mean that it must
13 declare all locks to be stale, and hence ineligible for reboot recovery.
14
15 RFC3530 and RFC5661 both suggest that the client should instead rely on the
16 server to respond to inelegible open share, lock and delegation reclaim
17 requests with NFS4ERR_NO_GRACE in this situation.
18
19 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22 ---
23 fs/nfs/nfs4state.c | 1 -
24 1 file changed, 1 deletion(-)
25
26 --- a/fs/nfs/nfs4state.c
27 +++ b/fs/nfs/nfs4state.c
28 @@ -1788,7 +1788,6 @@ static int nfs4_handle_reclaim_lease_err
29 break;
30 case -NFS4ERR_STALE_CLIENTID:
31 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
32 - nfs4_state_clear_reclaim_reboot(clp);
33 nfs4_state_start_reclaim_reboot(clp);
34 break;
35 case -NFS4ERR_CLID_INUSE: