From: Chuck Lever Date: Fri, 19 Mar 2010 20:14:26 +0000 (-0400) Subject: mount: Mount should retry unreachable hosts X-Git-Tag: nfs-utils-1-2-3-rc1~4 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0935cebc1e130c6adfd870c88a6493277c84d47f;p=nfs-utils.git mount: Mount should retry unreachable hosts Currently if a server is up but not responding (ie, it answers ARP requests, but not NFS or RPC requests), mount retries or backgrounds itself waiting for the server. If the server is not responding on the network at all, mount fails the mount request immediately. Users might find it more useful if mount retried in both cases. Note that this change means attempting to mount using a misspelled server name will "hang" for the retry amount. I suppose the error message isn't very helpful whether it fails immediately or waits a couple of minutes, though I imagine that an unreachable server is a much more common occurrence than a misspelling. Reported-by: Daniel Goering Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 9b8c38f..98557d2 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -799,6 +799,7 @@ static int nfs_is_permanent_error(int error) case ESTALE: case ETIMEDOUT: case ECONNREFUSED: + case EHOSTUNREACH: return 0; /* temporary */ default: return 1; /* permanent */