On 12/01/2011 03:41 PM, Steve Dickson wrote: > Hello, > > On 12/01/2011 12:33 PM, rnews@xxxxxxxxx wrote: >> > Mounting an NFS v3 volume from a server that is currently down, >> > immediately fails with a timeout error, instead of retrying: >> > >> > diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c >> > index 4032bf3..7ca0b3e 100644 >> > --- a/utils/mount/stropts.c >> > +++ b/utils/mount/stropts.c >> > @@ -663,6 +663,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi) >> > case ECONNREFUSED: >> > case EOPNOTSUPP: >> > case EHOSTUNREACH: >> > + case ESPIPE: >> > continue; >> > default: >> > goto out; >> > @@ -848,6 +849,7 @@ static int nfs_is_permanent_error(int error) >> > case ETIMEDOUT: >> > case ECONNREFUSED: >> > case EHOSTUNREACH: >> > + case ESPIPE: >> > return 0; /* temporary */ >> > default: >> > return 1; /* permanent */ >> > > I think the problem is more of nfs_rewrite_pmap_mount_options() > is not interrupting RPC correctly.... How about something like this: > > Author: Steve Dickson <steved@xxxxxxxxxx> > Date: Thu Dec 1 15:35:18 2011 -0500 > > mount.nfs: Background mounts failing on time out errors. > > Mounting with the "-o v3,bg,proto=udp" options will > fail, instead of trying, when the server is down. > The reason being nfs_rewrite_pmap_mount_options() > is not interrupting RPC timeouts correctly. > > Signed-off-by: Steve Dickson <steved@xxxxxxxxxx> > > diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c > index 4032bf3..d52e21a 100644 > --- a/utils/mount/stropts.c > +++ b/utils/mount/stropts.c > @@ -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; Committed... steved. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html