mounts.nfs: v2 and v3 background mounts should retry when server is down.
Subsystems (2)
PATCH 1/1 mounts.nfs: v2 and v3 background mounts should retry when server is down.
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.
--- utils/mount/stropts.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
utils/mount/stropts.c +4 -2
@@ -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)
Signature · 1 line
1.7.7.6
Hi-
Quoted 4 lines · Steve Dickson
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?
Quoted 36 lines
Signed-off-by Steve Dickson <[email protected]>---
utils/mount/stropts.c| 6 ++++--1 files changed, 4 insertions(+), 2 deletions(-)utils/mount/stropts.c +4
-2@@ -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)Signature · 6 lines
1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com
Quoted 10 lines · Chuck Lever
Hi-
Quoted 4 lines · Steve Dickson
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.
Quoted 6 lines · Steve Dickson
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 <[email protected]>
Committed...
steved.
Quoted 30 lines
--- utils/mount/stropts.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)utils/mount/stropts.c +4
-3@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html