diff mbox series

Retry NFSv3 mount after NFSv4 failure in auto negotiation

Message ID OSZPR01MB777260693E426F03068BC6E688402@OSZPR01MB7772.jpnprd01.prod.outlook.com (mailing list archive)
State New
Headers show
Series Retry NFSv3 mount after NFSv4 failure in auto negotiation | expand

Commit Message

Seiichi Ikarashi (Fujitsu) Oct. 18, 2024, 11:21 a.m. UTC
The problem happens when a v3 mount fails with ETIMEDOUT after
the v4 mount failed with EPROTONOSUPPORT, in mount auto negotiation.
It immediately breaks from the "for" loop in nfsmount_fg()
or nfsmount_child() due to EPROTONOSUPPORT, never doing the expected
retries until timeout.

Let's retry in v3, too.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
---
 utils/mount/stropts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index a92c420..103c41f 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -981,7 +981,7 @@  fall_back:
        if ((result = nfs_try_mount_v3v2(mi, FALSE)))
                return result;
 
-       if (errno != EBUSY && errno != EACCES)
+       if (errno != EBUSY && errno != EACCES && errno != ETIMEDOUT)
                errno = olderrno;
 
        return result;