diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-04-07 13:59:01 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-04-25 14:18:14 -0400 |
commit | 91a575e1a98451d12df713f267a9a210a9e5dcf9 (patch) | |
tree | 89a147e126c5ab04a22041e20fcae2c670e5ec9e /fs/nfs/client.c | |
parent | 7b1355b615c67e8fcbfb508e6baee83aed9dee96 (diff) |
NFS: Add a mount option "softerr" to allow clients to see ETIMEDOUT errors
Add a mount option that exposes the ETIMEDOUT errors that occur during
soft timeouts to the application. This allows aware applications to
distinguish between server disk IO errors and client timeout errors.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 90d71fda65ce..f74638c5e5b4 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -598,6 +598,8 @@ int nfs_init_server_rpcclient(struct nfs_server *server, sizeof(server->client->cl_timeout_default)); server->client->cl_timeout = &server->client->cl_timeout_default; server->client->cl_softrtry = 0; + if (server->flags & NFS_MOUNT_SOFTERR) + server->client->cl_softerr = 1; if (server->flags & NFS_MOUNT_SOFT) server->client->cl_softrtry = 1; |