- v4 mounts will roll back to v3 mounts when the mount fails with ENOENT.

This commit is contained in:
Steve Dickson 2009-11-02 16:14:06 +00:00
parent ac5a680078
commit c0c0c42d7f
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,32 @@
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:

View File

@ -31,6 +31,7 @@ Patch105: nfs-utils-1.2.1-rc6.patch
Patch106: nfs-utils-1.2.1-rc7.patch
Patch200: nfs-utils-1.2.0-v4root-rel7.patch
Patch201: nfs-utils-1.2.0-v4-enoent.patch
Group: System Environment/Daemons
Provides: exportfs = %{epoch}:%{version}-%{release}
@ -91,6 +92,7 @@ This package also contains the mount.nfs and umount.nfs program.
%patch106 -p1
%patch200 -p1
%patch201 -p1
# Remove .orig files
find . -name "*.orig" | xargs rm -f
@ -262,12 +264,14 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
* Mon Oct 26 2009 Steve Dickson <steved@redhat.com> 1.2.0-17
* Mon Nov 2 2009 Steve Dickson <steved@redhat.com> 1.2.0-17
- Updated to the latest pseudo root release (rel7).
- Added upstream 1.2.1-rc7 patch which fixes:
- Stop ignoring the -o v4 option (bz 529407)
- Allow network protocol roll backs when proto is set
in the config file (bz 529864)
- v4 mounts will roll back to v3 mounts when the mount
fails with ENOENT.
* Mon Oct 5 2009 Steve Dickson <steved@redhat.com> 1.2.0-16
- Fixed a whole where '-o v4' was not overriding the