* [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down.
@ 2012-04-25 15:39 Steve Dickson
2012-04-25 20:31 ` Chuck Lever
2012-05-01 19:35 ` Steve Dickson
0 siblings, 2 replies; 4+ messages in thread
From: Steve Dickson @ 2012-04-25 15:39 UTC (permalink / raw)
To: Linux NFS Mailing list
The point of background mounts is to have the mount
retried if the mount fails. This patch allows the v2/v3
background mount to proceed in the case when the server
is down by not making EOPNOTSUPP a permanent error.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/mount/stropts.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index d52e21a..e09aa7c 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -911,7 +911,8 @@ static int nfsmount_parent(struct nfsmount_info *mi)
if (nfs_try_mount(mi))
return EX_SUCCESS;
- if (nfs_is_permanent_error(errno)) {
+ /* retry background mounts when the server is not up */
+ if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP) {
mount_error(mi->spec, mi->node, errno);
return EX_FAIL;
}
@@ -946,7 +947,8 @@ static int nfsmount_child(struct nfsmount_info *mi)
if (nfs_try_mount(mi))
return EX_SUCCESS;
- if (nfs_is_permanent_error(errno))
+ /* retry background mounts when the server is not up */
+ if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP)
break;
if (time(NULL) > timeout)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down.
2012-04-25 15:39 [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down Steve Dickson
@ 2012-04-25 20:31 ` Chuck Lever
2012-04-26 17:36 ` Steve Dickson
2012-05-01 19:35 ` Steve Dickson
1 sibling, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2012-04-25 20:31 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing list
Hi-
On Apr 25, 2012, at 11:39 AM, Steve Dickson wrote:
> The point of background mounts is to have the mount
> retried if the mount fails. This patch allows the v2/v3
> background mount to proceed in the case when the server
> is down by not making EOPNOTSUPP a permanent error.
Just curious... why wouldn't we want to do this for foreground mounts as well?
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> utils/mount/stropts.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index d52e21a..e09aa7c 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -911,7 +911,8 @@ static int nfsmount_parent(struct nfsmount_info *mi)
> if (nfs_try_mount(mi))
> return EX_SUCCESS;
>
> - if (nfs_is_permanent_error(errno)) {
> + /* retry background mounts when the server is not up */
> + if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP) {
> mount_error(mi->spec, mi->node, errno);
> return EX_FAIL;
> }
> @@ -946,7 +947,8 @@ static int nfsmount_child(struct nfsmount_info *mi)
> if (nfs_try_mount(mi))
> return EX_SUCCESS;
>
> - if (nfs_is_permanent_error(errno))
> + /* retry background mounts when the server is not up */
> + if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP)
> break;
>
> if (time(NULL) > timeout)
> --
> 1.7.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down.
2012-04-25 20:31 ` Chuck Lever
@ 2012-04-26 17:36 ` Steve Dickson
0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2012-04-26 17:36 UTC (permalink / raw)
To: Chuck Lever; +Cc: Linux NFS Mailing list
On 04/25/2012 04:31 PM, Chuck Lever wrote:
> Hi-
>
> On Apr 25, 2012, at 11:39 AM, Steve Dickson wrote:
>
>> The point of background mounts is to have the mount
>> retried if the mount fails. This patch allows the v2/v3
>> background mount to proceed in the case when the server
>> is down by not making EOPNOTSUPP a permanent error.
>
> Just curious... why wouldn't we want to do this for foreground mounts as well?
I had a similar thought but I was worried that it would change the
current behavior that people are depending on... Giving the
option of putting the mount in back ground to wait I thought
was a good compromise...
steved.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down.
2012-04-25 15:39 [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down Steve Dickson
2012-04-25 20:31 ` Chuck Lever
@ 2012-05-01 19:35 ` Steve Dickson
1 sibling, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2012-05-01 19:35 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing list
On 04/25/2012 11:39 AM, Steve Dickson wrote:
> The point of background mounts is to have the mount
> retried if the mount fails. This patch allows the v2/v3
> background mount to proceed in the case when the server
> is down by not making EOPNOTSUPP a permanent error.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...
steved.
> ---
> utils/mount/stropts.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index d52e21a..e09aa7c 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -911,7 +911,8 @@ static int nfsmount_parent(struct nfsmount_info *mi)
> if (nfs_try_mount(mi))
> return EX_SUCCESS;
>
> - if (nfs_is_permanent_error(errno)) {
> + /* retry background mounts when the server is not up */
> + if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP) {
> mount_error(mi->spec, mi->node, errno);
> return EX_FAIL;
> }
> @@ -946,7 +947,8 @@ static int nfsmount_child(struct nfsmount_info *mi)
> if (nfs_try_mount(mi))
> return EX_SUCCESS;
>
> - if (nfs_is_permanent_error(errno))
> + /* retry background mounts when the server is not up */
> + if (nfs_is_permanent_error(errno) && errno != EOPNOTSUPP)
> break;
>
> if (time(NULL) > timeout)
> -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-01 19:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 15:39 [PATCH 1/1] mounts.nfs: v2 and v3 background mounts should retry when server is down Steve Dickson
2012-04-25 20:31 ` Chuck Lever
2012-04-26 17:36 ` Steve Dickson
2012-05-01 19:35 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).