All of lore.kernel.org
 help / color / mirror / Atom feed
* [nfs-utils PATCH] retry on EPERM from NFSv4 mount attempt
@ 2009-11-23 23:32 Neil Brown
       [not found] ` <19211.7054.291514.185591-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Neil Brown @ 2009-11-23 23:32 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs


Hi,
 I recently packaged nfs-utils 1.2.1 for openSUSE and fairly quickly
 got a bug report - "-o nfsvers=3" was needed to mount NFSv3
 filesystems.

 mount.nfs in 1.2.1 will first try a v4 mount but will fall-back to v3
 if it gets ENOENT.  This works fine.
 However for kernel prior to 2.6.25, you don't get ENOENT, you get
 EPERM.
 In that case the fall-back to v3 doesn't happen and you get a failure
 to mount.

 So I think we need to fall back on EPERM as well.  See below.

Thanks,
NeilBrown


diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index b595649..68eb82b 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -657,8 +657,10 @@ static int nfs_try_mount(struct nfsmount_info *mi)
 				 * To deal with legacy Linux servers that don't
 				 * automatically export a pseudo root, retry
 				 * ENOENT errors using version 3
+				 * And for Linux servers prior to 2.6.25, retry
+				 * EPERM
 				 */
-				if (errno != ENOENT)
+				if (errno != ENOENT && errno != EPERM)
 					break;
 			}
 		}

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-12-07 22:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 23:32 [nfs-utils PATCH] retry on EPERM from NFSv4 mount attempt Neil Brown
     [not found] ` <19211.7054.291514.185591-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2009-11-24 14:29   ` Steve Dickson
     [not found]     ` <4B0BEDDB.1010203-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-11-24 20:56       ` J. Bruce Fields
2009-11-24 21:19         ` Peter Staubach
2009-11-24 21:51         ` Neil Brown
     [not found]           ` <20091125085122.316f4eb3-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2009-11-24 21:58             ` Peter Staubach
2009-11-24 22:22               ` Neil Brown
     [not found]                 ` <20091125092227.77735d5a-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2009-11-24 22:29                   ` Peter Staubach
2009-11-24 22:54                     ` J. Bruce Fields
2009-11-24 22:58                   ` Trond Myklebust
2009-11-30 13:11       ` Steve Dickson
     [not found]         ` <4B13C48E.5020009-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-11-30 16:43           ` Chuck Lever
2009-11-30 17:41             ` Steve Dickson
     [not found]               ` <4B1403CA.8050107-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-11-30 17:52                 ` Chuck Lever
2009-11-30 18:12                   ` Steve Dickson
2009-11-30 18:18           ` J. Bruce Fields
2009-11-30 21:59             ` Neil Brown
     [not found]               ` <20091201085916.7c1bb644-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2009-11-30 22:13                 ` J. Bruce Fields
2009-12-07 22:27   ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.