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(-)

Comments

Scott Mayhew Nov. 1, 2024, 2:23 p.m. UTC | #1
On Fri, 18 Oct 2024, Seiichi Ikarashi (Fujitsu) wrote:

> 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 --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;
> 
This change looks good to me, but the patch itself doesn't apply (it has
spaces instead of tabs).

-Scott
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;