mount.nfs: Retry v4 mounts with v3 on ENOENT errors
Subsystems (2)
Quoted 33 lines · Steve Dickson
I'm trying to convince myself this is a good idea...
It would definitely help with the v3 to v4 transition in the Linux community, but at the end of the day, Linux servers that numerous compared to other types of server so its not clear this will not cause other problems...
Comments? Suggestions?
steved.
Author: Steve Dickson <[email protected]> Date: Tue Oct 20 10:25:34 EDT 2009Retry 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 <[email protected]>diff -up nfs-utils-1.2.0/utils/mount/stropts.c.orig
nfs-utils-1.2.0/utils/mount/stropts.cutils/mount/stropts.c renamed from utils/mount/stropts.c.orig +2
-2@@ -613,8 +613,15 @@ static int nfs_try_mount(struct nfsmountif (linux_version_code () >MAKE_VERSION (2 ,6 ,31 )) { errno =0 ; result =nfs_try_mount_v4 (mi); -if (errno !=EPROTONOSUPPORT ) -break ; +if (errno !=EPROTONOSUPPORT ) { +/*
utils/mount/stropts.c static int nfs_try_mount(struct nfsmount · line 627
Quoted 10 lines
utils/mount/stropts.c renamed from utils/mount/stropts.c.orig +7
-0+* 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 :
I am going to go ahead an commit this and then cut a release. I was waiting to include the server side dynamic pseudo root support, but it appears that will not happen in a timely matter...
After this release, I will actively start catching up on the backlog of purposed patches... Thank you for your patiences....
steved.