diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-09-10 01:16:53 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-10-23 01:47:56 +0200 |
commit | 6e7434abcd07e8beb67fdc4af6207ae0490d5274 (patch) | |
tree | d3ffd4948d10eb8b97bccb58b22c5651c2614f99 /fs/nfs/write.c | |
parent | NFSv4: Add a parameter to limit the number of retries after NFS4ERR_DELAY (diff) | |
download | linux-6e7434abcd07e8beb67fdc4af6207ae0490d5274.tar.xz linux-6e7434abcd07e8beb67fdc4af6207ae0490d5274.zip |
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.c | 2 |
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); |