Skip to content

Commit acce94e

Browse files
scottmayhewTrond Myklebust
authored and
Trond Myklebust
committed
nfsv3: Make v3 mounts fail with ETIMEDOUTs instead EIO on mountd timeouts
In very busy v3 environment, rpc.mountd can respond to the NULL procedure but not the MNT procedure in a timely manner causing the MNT procedure to time out. The problem is the mount system call returns EIO which causes the mount to fail, instead of ETIMEDOUT, which would cause the mount to be retried. This patch sets the RPC_TASK_SOFT|RPC_TASK_TIMEOUT flags to the rpc_call_sync() call in nfs_mount() which causes ETIMEDOUT to be returned on timed out connections. Signed-off-by: Steve Dickson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected]
1 parent 7175fe9 commit acce94e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/mount_clnt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ int nfs_mount(struct nfs_mount_request *info)
181181
else
182182
msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC_MNT];
183183

184-
status = rpc_call_sync(mnt_clnt, &msg, 0);
184+
status = rpc_call_sync(mnt_clnt, &msg, RPC_TASK_SOFT|RPC_TASK_TIMEOUT);
185185
rpc_shutdown_client(mnt_clnt);
186186

187187
if (status < 0)

0 commit comments

Comments
 (0)