diff --git a/nfs-utils-1.2.0-v4-enoent.patch b/nfs-utils-1.2.0-v4-enoent.patch new file mode 100644 index 0000000..66fa6aa --- /dev/null +++ b/nfs-utils-1.2.0-v4-enoent.patch @@ -0,0 +1,32 @@ +Author: Steve Dickson +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 + +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: + diff --git a/nfs-utils.spec b/nfs-utils.spec index 65d4e88..69c1aa1 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -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 1.2.0-17 +* Mon Nov 2 2009 Steve Dickson 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 1.2.0-16 - Fixed a whole where '-o v4' was not overriding the