1 From 059aa734824165507c65fd30a55ff000afd14983 Mon Sep 17 00:00:00 2001
2 From: Chuck Lever <chuck.lever@oracle.com>
3 Date: Sun, 22 Jan 2017 14:04:29 -0500
4 Subject: nfs: Don't increment lock sequence ID after NFS4ERR_MOVED
6 From: Chuck Lever <chuck.lever@oracle.com>
8 commit 059aa734824165507c65fd30a55ff000afd14983 upstream.
10 Xuan Qi reports that the Linux NFSv4 client failed to lock a file
11 that was migrated. The steps he observed on the wire:
13 1. The client sent a LOCK request to the source server
14 2. The source server replied NFS4ERR_MOVED
15 3. The client switched to the destination server
16 4. The client sent the same LOCK request to the destination
17 server with a bumped lock sequence ID
18 5. The destination server rejected the LOCK request with
21 RFC 3530 section 8.1.5 provides a list of NFS errors which do not
22 bump a lock sequence ID.
24 However, RFC 3530 is now obsoleted by RFC 7530. In RFC 7530 section
25 9.1.7, this list has been updated by the addition of NFS4ERR_MOVED.
27 Reported-by: Xuan Qi <xuan.qi@oracle.com>
28 Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
29 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 include/linux/nfs4.h | 3 ++-
34 1 file changed, 2 insertions(+), 1 deletion(-)
36 --- a/include/linux/nfs4.h
37 +++ b/include/linux/nfs4.h
38 @@ -266,7 +266,7 @@ enum nfsstat4 {
40 static inline bool seqid_mutating_err(u32 err)
42 - /* rfc 3530 section 8.1.5: */
43 + /* See RFC 7530, section 9.1.7 */
45 case NFS4ERR_STALE_CLIENTID:
46 case NFS4ERR_STALE_STATEID:
47 @@ -275,6 +275,7 @@ static inline bool seqid_mutating_err(u3
49 case NFS4ERR_RESOURCE:
50 case NFS4ERR_NOFILEHANDLE: