pNFS/NFSv4: Improve rejection of out-of-order layouts
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 22 Jan 2021 15:05:51 +0000 (10:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Feb 2021 12:55:06 +0000 (13:55 +0100)
commitff557bf971ad6ab34817a82209c0396b8820c9fe
treeadd1f1042a7a16398c05a1fef7552b24fbd9d042
parent386b142945d3a8842c615421158f6d8565ef86e7
pNFS/NFSv4: Improve rejection of out-of-order layouts

[ Upstream commit d29b468da4f940bd2bff2628ba8d2d652671d244 ]

If a layoutget ends up being reordered w.r.t. a layoutreturn, e.g. due
to a layoutget-on-open not knowing a priori which file to lock, then we
must assume the layout is no longer being considered valid state by the
server.
Incrementally improve our ability to reject such states by using the
cached old stateid in conjunction with the plh_barrier to try to
identify them.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/pnfs.c