summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2023-09-10 02:16:53 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2023-10-23 02:47:56 +0300
commit6e7434abcd07e8beb67fdc4af6207ae0490d5274 (patch)
treed3ffd4948d10eb8b97bccb58b22c5651c2614f99 /fs/nfs/write.c
parent5b9d31ae1c925bb5f15975e31b31ff5ae3c81f8f (diff)
downloadlinux-6e7434abcd07e8beb67fdc4af6207ae0490d5274.tar.xz
NFSv4/pnfs: Allow layoutget to return EAGAIN for softerr mounts
If we're using the 'softerr' mount option, we may want to allow layoutget to return EAGAIN to allow knfsd server threads to return a JUKEBOX/DELAY error to the client instead of busy waiting. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 9d82d50ce0b1..b664caea8b4e 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -739,6 +739,8 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
&pgio);
pgio.pg_error = 0;
nfs_pageio_complete(&pgio);
+ if (err == -EAGAIN && mntflags & NFS_MOUNT_SOFTERR)
+ break;
} while (err < 0 && !nfs_error_is_fatal(err));
nfs_io_completion_put(ioc);