]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4 client live hangs after live data migration recovery
authorBill Baker <Bill.Baker@Oracle.com>
Tue, 19 Jun 2018 21:24:58 +0000 (16:24 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 31 Jul 2018 16:53:40 +0000 (12:53 -0400)
commit1ec56bc6c7b9660d647c293d9884e4b58dedf1c4
treeef067b9220fd2a66da0be40359de526fc3f95579
parentbd66dad47fe23c63d3c493d77dd06bdb177aec74
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: f82ce57c9c07 ("SUNRPC: Use the multipath iterator to assign a ...")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c
include/linux/sunrpc/clnt.h
net/sunrpc/clnt.c