]> Git Repo - linux.git/commit
NFSv3: only use NFS timeout for MOUNT when protocols are compatible
authorNeilBrown <[email protected]>
Fri, 4 Oct 2024 01:07:23 +0000 (11:07 +1000)
committerAnna Schumaker <[email protected]>
Mon, 4 Nov 2024 15:24:18 +0000 (10:24 -0500)
commit6e2a10343ecb71c4457bc16be05758f9c7aae7d9
tree88be4a4a41527578fd1122cff03b6d5866e19b56
parent10f0740234f0b157b41bdc7e9c3555a9b86c1599
NFSv3: only use NFS timeout for MOUNT when protocols are compatible

If a timeout is specified in the mount options, it currently applies to
both the NFS protocol and (with v3) the MOUNT protocol.  This is
sensible when they both use the same underlying protocol, or those
protocols are compatible w.r.t timeouts as RDMA and TCP are.

However if, for example, NFS is using TCP and MOUNT is using UDP then
using the same timeout doesn't make much sense.

If you
   mount -o vers=3,proto=tcp,mountproto=udp,timeo=600,retrans=5 \
      server:/path /mountpoint

then the timeo=600 which was intended for the NFS/TCP request will
apply to the MOUNT/UDP requests with the result that there will only be
one request sent (because UDP has a maximum timeout of 60 seconds).
This is not what a reasonable person might expect.

This patch disables the sharing of timeout information in cases where
the underlying protocols are not compatible.

Fixes: c9301cb35b59 ("nfs: hornor timeo and retrans option when mounting NFSv3")
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
fs/nfs/super.c
This page took 0.054623 seconds and 4 git commands to generate.