]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/stropts.c
mount.nfs: try the next address after mount fails with ETIMEDOUT
[nfs-utils.git] / utils / mount / stropts.c
index d52e21a8749c17d770314c7863e96e49f4efbb79..0aa9a7586dbe6eadf877450e715844907a9aa945 100644 (file)
@@ -665,6 +665,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
                case ECONNREFUSED:
                case EOPNOTSUPP:
                case EHOSTUNREACH:
+               case ETIMEDOUT:
                        continue;
                default:
                        goto out;
@@ -752,6 +753,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
                switch (errno) {
                case ECONNREFUSED:
                case EHOSTUNREACH:
+               case ETIMEDOUT:
                        continue;
                default:
                        goto out;
@@ -911,7 +913,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 +949,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)