]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Retry v4 mounts with a v3 mount when the version
authorSteve Dickson <steved@redhat.com>
Tue, 3 Nov 2009 14:49:03 +0000 (09:49 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 3 Nov 2009 14:49:03 +0000 (09:49 -0500)
is not explicitly specified and the mount fails
with ENOENT. The will help deal with Linux servers
that do not automatically export a pseudo root

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

index 7b63b4572128909dbe6bf61fd6084caef1a8e2b6..709f0ff24ed3e4d1fd7382c03de2f42919dcd0ee 100644 (file)
@@ -628,8 +628,15 @@ static int nfs_try_mount(struct nfsmount_info *mi)
                if (linux_version_code() > MAKE_VERSION(2, 6, 31)) {
                        errno = 0;
                        result = nfs_try_mount_v4(mi);
-                       if (errno != EPROTONOSUPPORT)
-                               break;
+                       if (errno != EPROTONOSUPPORT) {
+                               /* 
+                                * To deal with legacy Linux servers that don't
+                                * automatically export a pseudo root, retry
+                                * ENOENT errors using version 3
+                                */
+                               if (errno != ENOENT)
+                                       break;
+                       }
                }
        case 2:
        case 3: