OSDN Git Service

nfs: hornor timeo and retrans option when mounting NFSv3
authorEryu Guan <eguan@linux.alibaba.com>
Tue, 23 Mar 2021 02:57:13 +0000 (10:57 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 5 Apr 2021 13:04:21 +0000 (09:04 -0400)
commitc9301cb35b59ad7d733a7332f3aefd4da1382468
tree121b59ea9a5d1140f6f9c239d9c0fa0f6a2dad04
parent6b996476f364009e9be43e98f5bca11e5ec95b2d
nfs: hornor timeo and retrans option when mounting NFSv3

Mounting NFSv3 uses default timeout parameters specified by underlying
sunrpc transport, and mount options like 'timeo' and 'retrans', unlike
NFSv4, are not honored.

But sometimes we want to set non-default timeout value when mounting
NFSv3, so pass 'timeo' and 'retrans' to nfs_mount() and fill the
'timeout' field of struct rpc_create_args before creating RPC
connection. This is also consistent with NFSv4 behavior.

Note that this only sets the timeout value of rpc connection to mountd,
but the timeout of rpcbind connection should be set as well. A later
patch will fix the rpcbind part.

Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/internal.h
fs/nfs/mount_clnt.c
fs/nfs/super.c