public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Retry NFSv3 mount after NFSv4 failure in auto negotiation
@ 2024-10-18 11:21 Seiichi Ikarashi (Fujitsu)
  2024-11-01 14:23 ` Scott Mayhew
  0 siblings, 1 reply; 2+ messages in thread
From: Seiichi Ikarashi (Fujitsu) @ 2024-10-18 11:21 UTC (permalink / raw)
  To: 'steved@redhat.com'
  Cc: 'linux-nfs@vger.kernel.org',
	'sorenson@redhat.com'

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;

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

* Re: [PATCH] Retry NFSv3 mount after NFSv4 failure in auto negotiation
  2024-10-18 11:21 [PATCH] Retry NFSv3 mount after NFSv4 failure in auto negotiation Seiichi Ikarashi (Fujitsu)
@ 2024-11-01 14:23 ` Scott Mayhew
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Mayhew @ 2024-11-01 14:23 UTC (permalink / raw)
  To: Seiichi Ikarashi (Fujitsu)
  Cc: 'steved@redhat.com', 'linux-nfs@vger.kernel.org',
	'sorenson@redhat.com'

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


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

end of thread, other threads:[~2024-11-01 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 11:21 [PATCH] Retry NFSv3 mount after NFSv4 failure in auto negotiation Seiichi Ikarashi (Fujitsu)
2024-11-01 14:23 ` Scott Mayhew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox