33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
Author: Steve Dickson <steved@redhat.com>
|
|
Date: Tue Oct 20 10:25:34 EDT 2009
|
|
|
|
Retry v4 mounts with a v3 mount when the version
|
|
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>
|
|
|
|
diff -up nfs-utils-1.2.0/utils/mount/stropts.c.orig nfs-utils-1.2.0/utils/mount/stropts.c
|
|
--- nfs-utils-1.2.0/utils/mount/stropts.c.orig 2009-10-20 10:11:03.000000000 -0400
|
|
+++ nfs-utils-1.2.0/utils/mount/stropts.c 2009-10-20 10:24:41.000000000 -0400
|
|
@@ -613,8 +613,15 @@ static int nfs_try_mount(struct nfsmount
|
|
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:
|
|
|