NFS: Fix interrupted slots by sending a solo SEQUENCE operation
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 8 Jul 2020 14:33:40 +0000 (10:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:09 +0000 (09:34 +0200)
commitf247ab500974a21061058a115b315cee7969d05d
treeebe511cd41f6429211559f4faf2065315464c237
parenta6793b643d90f7c04ac7c8b07cf0a28b44198969
NFS: Fix interrupted slots by sending a solo SEQUENCE operation

[ Upstream commit 913fadc5b105c3619d9e8d0fe8899ff1593cc737 ]

We used to do this before 3453d5708b33, but this was changed to better
handle the NFS4ERR_SEQ_MISORDERED error code. This commit fixed the slot
re-use case when the server doesn't receive the interrupted operation,
but if the server does receive the operation then it could still end up
replying to the client with mis-matched operations from the reply cache.

We can fix this by sending a SEQUENCE to the server while recovering from
a SEQ_MISORDERED error when we detect that we are in an interrupted slot
situation.

Fixes: 3453d5708b33 (NFSv4.1: Avoid false retries when RPC calls are interrupted)
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c