linux-stable/include/linux/sunrpc
Bill Baker 0f90be132c NFSv4 client live hangs after live data migration recovery
After a live data migration event at the NFS server, the client may send
I/O requests to the wrong server, causing a live hang due to repeated
recovery events.  On the wire, this will appear as an I/O request failing
with NFS4ERR_BADSESSION, followed by successful CREATE_SESSION, repeatedly.
NFS4ERR_BADSSESSION is returned because the session ID being used was
issued by the other server and is not valid at the old server.

The failure is caused by async worker threads having cached the transport
(xprt) in the rpc_task structure.  After the migration recovery completes,
the task is redispatched and the task resends the request to the wrong
server based on the old value still present in tk_xprt.

The solution is to recompute the tk_xprt field of the rpc_task structure
so that the request goes to the correct server.

Signed-off-by: Bill Baker <bill.baker@oracle.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Helen Chao <helen.chao@oracle.com>
Fixes: fb43d17210 ("SUNRPC: Use the multipath iterator to assign a ...")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2018-07-31 12:53:40 -04:00
..
addr.h
auth.h net/sunrpc: Make rpc_auth_create_args a const 2018-07-30 13:19:41 -04:00
auth_gss.h
bc_xprt.h
cache.h sunrpc: make the function arg as const 2017-11-27 16:45:11 -05:00
clnt.h NFSv4 client live hangs after live data migration recovery 2018-07-31 12:53:40 -04:00
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h
gss_krb5_enctypes.h
metrics.h sunrpc: Change rpc_print_iostats to rpc_clnt_show_stats and handle rpc_clnt clones 2018-07-31 12:53:35 -04:00
msg_prot.h
rpc_pipe_fs.h remove rpc_rmdir() 2018-04-16 14:20:26 -04:00
rpc_rdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
sched.h SUNRPC: Queue latency-sensitive socket tasks to xprtiod 2018-02-07 09:25:52 -05:00
stats.h
svc.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04:00
svc_rdma.h svcrdma: Remove unused svc_rdma_op_ctxt 2018-05-11 15:48:57 -04:00
svc_xprt.h sunrpc: Save remote presentation address in svc_xprt for trace events 2018-04-03 15:08:11 -04:00
svcauth.h
svcauth_gss.h
svcsock.h
timer.h
types.h
xdr.h NFSv4; Clean up XDR encoding of type bitmap4 2018-04-10 16:06:22 -04:00
xprt.h xprtrdma: Make rpc_rqst part of rpcrdma_req 2018-05-07 09:20:03 -04:00
xprtmultipath.h
xprtrdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
xprtsock.h