NFSv4/pNFS: Do not fail I/O when we fail to allocate the pNFS layout
[ Upstream commit3764a17e31] Commit587f03deb6caused 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:587f03deb6("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>
This commit is contained in:
parent
83839a333f
commit
96fdbb1c85
1 changed files with 2 additions and 0 deletions
|
|
@ -2006,6 +2006,7 @@ lookup_again:
|
||||||
lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags);
|
lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags);
|
||||||
if (lo == NULL) {
|
if (lo == NULL) {
|
||||||
spin_unlock(&ino->i_lock);
|
spin_unlock(&ino->i_lock);
|
||||||
|
lseg = ERR_PTR(-ENOMEM);
|
||||||
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
|
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
|
||||||
PNFS_UPDATE_LAYOUT_NOMEM);
|
PNFS_UPDATE_LAYOUT_NOMEM);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
@ -2134,6 +2135,7 @@ lookup_again:
|
||||||
|
|
||||||
lgp = pnfs_alloc_init_layoutget_args(ino, ctx, &stateid, &arg, gfp_flags);
|
lgp = pnfs_alloc_init_layoutget_args(ino, ctx, &stateid, &arg, gfp_flags);
|
||||||
if (!lgp) {
|
if (!lgp) {
|
||||||
|
lseg = ERR_PTR(-ENOMEM);
|
||||||
trace_pnfs_update_layout(ino, pos, count, iomode, lo, NULL,
|
trace_pnfs_update_layout(ino, pos, count, iomode, lo, NULL,
|
||||||
PNFS_UPDATE_LAYOUT_NOMEM);
|
PNFS_UPDATE_LAYOUT_NOMEM);
|
||||||
nfs_layoutget_end(lo);
|
nfs_layoutget_end(lo);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue