]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFSv4: When recovering state fails with EAGAIN, retry the same recovery
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 22 Jul 2019 08:54:29 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:30:12 +0000 (08:30 +0200)
commit5ebc4cb0531545d87d3163377549bcef86f552d0
tree261a06d7ec788280ce49481f77756687b33d06bf
parent8c0391db53efffb30913c06367f1b3793fc3ba18
NFSv4: When recovering state fails with EAGAIN, retry the same recovery

[ Upstream commit c34fae003c79570b6c930b425fea3f0b7b1e7056 ]

If the server returns with EAGAIN when we're trying to recover from
a server reboot, we currently delay for 1 second, but then mark the
stateid as needing recovery after the grace period has expired.

Instead, we should just retry the same recovery process immediately
after the 1 second delay. Break out of the loop after 10 retries.

Fixes: 35a61606a612 ("NFS: Reduce indentation of the switch statement...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4state.c