NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 14 May 2022 14:08:11 +0000 (10:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:15 +0000 (10:23 +0200)
commiteaf407d5b5fe6a829f60357038f99c38e2986dcb
tree849b08069380d8d59a188ed025103dd80a95bacc
parent471577e926ebc9cf4d661fde7558f4910a53273f
NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout

[ Upstream commit 3764a17e31d579cf9b4bd0a69894b577e8d75702 ]

Commit 587f03deb69b caused pnfs_update_layout() to stop returning ENOMEM
when the memory allocation fails, and hence causes it to fall back to
trying to do I/O through the MDS. There is no guarantee that this will
fare any better. If we're failing the pNFS layout allocation, then we
should just redirty the page and retry later.

Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: 587f03deb69b ("pnfs: refactor send_layoutget")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/pnfs.c