]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: Background mounts failing on time out errors.
authorSteve Dickson <steved@redhat.com>
Mon, 5 Dec 2011 14:48:46 +0000 (09:48 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 5 Dec 2011 14:48:46 +0000 (09:48 -0500)
Mounting with the "-o v3,bg,proto=udp" options will
fail, instead of retrying, when the server is down.
The reason being nfs_rewrite_pmap_mount_options()
does not interrupt RPC timeouts correctly.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/stropts.c

index 4032bf3e7aed502616a8b76c1e4ef79d193fc36f..d52e21a8749c17d770314c7863e96e49f4efbb79 100644 (file)
@@ -540,6 +540,8 @@ nfs_rewrite_pmap_mount_options(struct mount_options *options)
                        errno = EOPNOTSUPP;
                else if (rpc_createerr.cf_stat == RPC_AUTHERROR)
                        errno = EACCES;
+               else if (rpc_createerr.cf_stat == RPC_TIMEDOUT)
+                       errno = ETIMEDOUT;
                else if (rpc_createerr.cf_error.re_errno != 0)
                        errno = rpc_createerr.cf_error.re_errno;
                return 0;