* [PATCH] NFS: Map minor mismatch error to protocol not support error.
@ 2012-06-06 18:12 Steve Dickson
2012-06-06 18:31 ` Chuck Lever
0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2012-06-06 18:12 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Linux NFS Mailing list
Sservers that only have NFSv4.1 support the
NFS4ERR_MINOR_VERS_MISMATCH error is return on
v4.0 mounts. Mapping that error to EPROTONOSUPPORT
will cause the mount to back off to v3 instead of
failing.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
fs/nfs/nfs4proc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d48dbef..eda028b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -105,6 +105,8 @@ static int nfs4_map_errors(int err)
return -EINVAL;
case -NFS4ERR_SHARE_DENIED:
return -EACCES;
+ case -NFS4ERR_MINOR_VERS_MISMATCH:
+ return -EPROTONOSUPPORT;
default:
dprintk("%s could not handle NFSv4 error %d\n",
__func__, -err);
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFS: Map minor mismatch error to protocol not support error.
2012-06-06 18:12 [PATCH] NFS: Map minor mismatch error to protocol not support error Steve Dickson
@ 2012-06-06 18:31 ` Chuck Lever
2012-06-06 21:00 ` Steve Dickson
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2012-06-06 18:31 UTC (permalink / raw)
To: Steve Dickson; +Cc: Trond Myklebust, Linux NFS Mailing list
On Jun 6, 2012, at 2:12 PM, Steve Dickson wrote:
> Sservers that only have NFSv4.1 support the
> NFS4ERR_MINOR_VERS_MISMATCH error is return on
> v4.0 mounts. Mapping that error to EPROTONOSUPPORT
> will cause the mount to back off to v3 instead of
> failing.
Should we try NFSv4.0 first?
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> fs/nfs/nfs4proc.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index d48dbef..eda028b 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -105,6 +105,8 @@ static int nfs4_map_errors(int err)
> return -EINVAL;
> case -NFS4ERR_SHARE_DENIED:
> return -EACCES;
> + case -NFS4ERR_MINOR_VERS_MISMATCH:
> + return -EPROTONOSUPPORT;
> default:
> dprintk("%s could not handle NFSv4 error %d\n",
> __func__, -err);
> --
> 1.7.1
>
> --
> 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] 3+ messages in thread
* Re: [PATCH] NFS: Map minor mismatch error to protocol not support error.
2012-06-06 18:31 ` Chuck Lever
@ 2012-06-06 21:00 ` Steve Dickson
0 siblings, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2012-06-06 21:00 UTC (permalink / raw)
To: Chuck Lever; +Cc: Trond Myklebust, Linux NFS Mailing list
On 06/06/2012 02:31 PM, Chuck Lever wrote:
>
> On Jun 6, 2012, at 2:12 PM, Steve Dickson wrote:
>
>> Sservers that only have NFSv4.1 support the
>> NFS4ERR_MINOR_VERS_MISMATCH error is return on
>> v4.0 mounts. Mapping that error to EPROTONOSUPPORT
>> will cause the mount to back off to v3 instead of
>> failing.
>
> Should we try NFSv4.0 first?
We do try v4.0 first and that mount fails with
NFS4ERR_MINOR_VERS_MISMATCH. Today the kenrel sends up
an EIO error which causes the mount to fail. With this
patch, the kernel will send up a EPROTONOSUPPORT error
which will cause a v3 mount to be tried...
steved.
>
>>
>> Signed-off-by: Steve Dickson <steved@redhat.com>
>> ---
>> fs/nfs/nfs4proc.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index d48dbef..eda028b 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -105,6 +105,8 @@ static int nfs4_map_errors(int err)
>> return -EINVAL;
>> case -NFS4ERR_SHARE_DENIED:
>> return -EACCES;
>> + case -NFS4ERR_MINOR_VERS_MISMATCH:
>> + return -EPROTONOSUPPORT;
>> default:
>> dprintk("%s could not handle NFSv4 error %d\n",
>> __func__, -err);
>> --
>> 1.7.1
>>
>> --
>> 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] 3+ messages in thread
end of thread, other threads:[~2012-06-06 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 18:12 [PATCH] NFS: Map minor mismatch error to protocol not support error Steve Dickson
2012-06-06 18:31 ` Chuck Lever
2012-06-06 21:00 ` 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).