summaryrefslogtreecommitdiffstats
path: root/utils/mount/stropts.c
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2012-05-01 15:34:34 -0400
committerSteve Dickson <steved@redhat.com>2012-05-01 15:34:34 -0400
commitbf66c9facb8e4798c79e1286e3da2dcafeed83fb (patch)
treed657c6ac14e1567b08317708fe6d8044cf14d058 /utils/mount/stropts.c
parent4bcb8664cf44176a99fc2c4b92e7f28ee705a7d9 (diff)
downloadnfs-utils-bf66c9facb8e4798c79e1286e3da2dcafeed83fb.tar.gz
nfs-utils-bf66c9facb8e4798c79e1286e3da2dcafeed83fb.tar.xz
nfs-utils-bf66c9facb8e4798c79e1286e3da2dcafeed83fb.zip
mounts.nfs: v2 and v3 background mounts should retry when server is down.
The point of background mounts is to have the mount retried if the mount fails. This patch allows the v2/v3 background mount to proceed in the case when the server is down by not making EOPNOTSUPP a permanent error. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/stropts.c')
-rw-r--r--utils/mount/stropts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index d52e21a..e09aa7c 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -911,7 +911,8 @@ static int nfsmount_parent(struct nfsmount_info *mi)
if (nfs_try_mount(mi))
return EX_SUCCESS;
- if (nfs_is_permanent_error(errno)) {
+ /* retry background mounts when the server is not up */
+ if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP) {
mount_error(mi->spec, mi->node, errno);
return EX_FAIL;
}
@@ -946,7 +947,8 @@ static int nfsmount_child(struct nfsmount_info *mi)
if (nfs_try_mount(mi))
return EX_SUCCESS;
- if (nfs_is_permanent_error(errno))
+ /* retry background mounts when the server is not up */
+ if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP)
break;
if (time(NULL) > timeout)