NFS: map nfs_probe_fsinfo errors
Subsystems (2)
PATCH 1/1 NFS: map nfs_probe_fsinfo errors
From: Andy Adamson <[email protected]>
Callers of nfs_probe_fsinfo return ERR_PTR errors. NFSv4 errors need to be mapped.
--- fs/nfs/client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/client.c +1 -1
@@ -817,7 +817,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str out_error:dprintk ("nfs_probe_fsinfo: error = %d\n" , -error); -return error; +return nfs4_map_errors (error); }/*
Signature · 1 line
1.5.4.3
Quoted 15 lines · On Thu, 2008-12-04 at 12:09 -0500, [email protected] wrote:
From: Andy Adamson <[email protected]>
Callers of
nfs_probe_fsinforeturnERR_PTRerrors. NFSv4 errors need to be mapped.Signed-off-by Andy Adamson <[email protected]>--- fs/nfs/client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfs/client.c +0
-0
fs/nfs/client.c static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str · line 823
Quoted 8 lines
fs/nfs/client.c +1
-1@@ -817,7 +817,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str out_error:dprintk ("nfs_probe_fsinfo: error = %d\n" , -error); -return error; +return nfs4_map_errors (error); }/*
No. This is still in generic code that is also called by both NFSv2 and v3. We should _never_ be passing NFSv4 errors this far up the stack.
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1228411011.7475.6.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 23 lines · Trond Myklebust
Quoted 22 lines · On Thu, 2008-12-04 at 12:09 -0500, [email protected] wrote:
From: Andy Adamson <[email protected]>
Callers of
nfs_probe_fsinforeturnERR_PTRerrors. NFSv4 errors need to be mapped.Signed-off-by Andy Adamson <[email protected]>--- fs/nfs/client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfs/client.c +1
-1@@ -817,7 +817,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str out_error:dprintk ("nfs_probe_fsinfo: error = %d\n" , -error); -return error; +return nfs4_map_errors (error); }
Quoted 4 lines
fs/nfs/client.c static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str · line 823
Quoted 1 line
fs/nfs/client.c +0
-0/* No. This is still in generic code that is also called by both NFSv2 and v3. We should _never_ be passing NFSv4 errors this far up the stack.
...besides, exactly which NFSv4 specific errors are supposed to be leaking here? I'm not aware of any v4-specific errors that may be returned by fsinfo.
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1228411282.7475.9.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 24 lines · Trond Myklebust
Quoted 23 lines · Trond Myklebust
Quoted 22 lines · On Thu, 2008-12-04 at 12:09 -0500, [email protected] wrote:
From: Andy Adamson <[email protected]>
Callers of
nfs_probe_fsinforeturnERR_PTRerrors. NFSv4 errors need to be mapped.Signed-off-by Andy Adamson <[email protected]>--- fs/nfs/client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nfs/client.c +1
-1@@ -817,7 +817,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str out_error:dprintk ("nfs_probe_fsinfo: error = %d\n" , -error); -return error; +return nfs4_map_errors (error); }
Quoted 4 lines
Quoted 4 lines
fs/nfs/client.c static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str · line 823
Quoted 1 line
fs/nfs/client.c +0
-0/* No. This is still in generic code that is also called by both NFSv2 and v3. We should _never_ be passing NFSv4 errors this far up the stack.
Sorry it took so long.
I think I finally see your point. I'll map the errors in nfs4_proc_fsinfo.
Quoted 4 lines
...besides, exactly which NFSv4 specific errors are supposed to be leaking here? I'm not aware of any v4-specific errors that may be returned by fsinfo.
fsinfo is a PUTFH and a GETATTR.
v4.0 specific errors:NFS4ERR_SERVERFAULT, NFS4ERR_FHEXPIRED, NFS4ERR_MOVED, NFS4ERR_RESOURCE, NFS4ERR_WRONGSEC
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.
v4.1 adds all the session related errors.
-->Andy
Quoted 12 lines
--
Trond Myklebust
Linux NFS client maintainerNetApp
[email protected]
www.netapp.com
--
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
A message that is not in the archive (sent off-list or not yet received): 89c397150812041050u184afda7s2d33bc1aa82b8171-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 5 lines · William A. (Andy) Adamson
fsinfo is a PUTFH and a GETATTR.
v4.0 specific errors:
NFS4ERR_SERVERFAULT,NFS4ERR_FHEXPIRED,NFS4ERR_MOVED,NFS4ERR_RESOURCE,NFS4ERR_WRONGSEC
Should all be either handled or else mapped into generic errors by the call to nfs4_handle_exception in nfs4_do_fsinfo().
Quoted 4 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.
Should never happen on a v4.0 client...
Quoted 1 line
v4.1 adds all the session related errors.
Those should be handled and/or mapped by the call to nfs4_handle_exception() in nfs4_do_fsinfo().
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1228417616.7475.16.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 13 lines · Trond Myklebust
Quoted 5 lines · William A. (Andy) Adamson
fsinfo is a PUTFH and a GETATTR.
v4.0 specific errors:
NFS4ERR_SERVERFAULT,NFS4ERR_FHEXPIRED,NFS4ERR_MOVED,NFS4ERR_RESOURCE,NFS4ERR_WRONGSECShould all be either handled or else mapped into generic errors by the call to
nfs4_handle_exceptioninnfs4_do_fsinfo().Quoted 3 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
Quoted 8 lines
Quoted 1 line
NFS4ERR_MINOR_VERS_MISMATCH.Should never happen on a v4.0 client...
Quoted 1 line
v4.1 adds all the session related errors.
Those should be handled and/or mapped by the call to
nfs4_handle_exception()innfs4_do_fsinfo().
OK - Thanks.
-->Andy
Quoted 13 lines
--
Trond Myklebust
Linux NFS client maintainerNetApp
[email protected]
www.netapp.com
--
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
A message that is not in the archive (sent off-list or not yet received): 89c397150812041116t74692ca1k5ce2ca87e64b5a2b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 6 lines · William A. (Andy) Adamson
Quoted 6 lines
Quoted 4 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.Should never happen on a v4.0 client...
Hmm...
That said, it wouldn't harm to add the MINOR_VERS_MISMATCH error to nfs_errtbl[]. I suppose the only thing we can do is to map it to EIO, but that would be better than letting it slip through the cracks...
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1228420665.7475.19.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
How about -EPROTONOSUPPORT?
Quoted 22 lines · Trond Myklebust
Quoted 6 lines · William A. (Andy) Adamson
Quoted 6 lines
Quoted 4 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.Should never happen on a v4.0 client...
Hmm...
That said, it wouldn't harm to add the
MINOR_VERS_MISMATCHerror to nfs_errtbl[]. I suppose the only thing we can do is to map it to EIO, but that would be better than letting it slip through the cracks...--
Trond Myklebust
Linux NFS client maintainerNetApp
[email protected]
www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 89c397150812041231v4eeeb6a4y5106b7db9b53c037-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 1 line · William A. (Andy) Adamson
How about
-EPROTONOSUPPORT?
That's definitely what you should return to the 'mount' command, but not to applications.
Cheers
Trond
Quoted 24 lines
Quoted 22 lines · Trond Myklebust
Quoted 6 lines · William A. (Andy) Adamson
Quoted 6 lines
Quoted 4 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.Should never happen on a v4.0 client...
Hmm...
That said, it wouldn't harm to add the
MINOR_VERS_MISMATCHerror to nfs_errtbl[]. I suppose the only thing we can do is to map it to EIO, but that would be better than letting it slip through the cracks...--
Trond Myklebust
Linux NFS client maintainerNetApp
[email protected]
www.netapp.com
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1228424344.24870.0.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 5 lines · Trond Myklebust
Quoted 1 line · William A. (Andy) Adamson
How about
-EPROTONOSUPPORT?That's definitely what you should return to the 'mount' command, but not to applications.
That should be possible if we deal with it differently in nfs4_proc_sequence() and reclaimer().
Benny
Quoted 26 lines
Cheers
TrondQuoted 22 lines
Quoted 20 lines · Trond Myklebust
Quoted 5 lines · William A. (Andy) Adamson
Quoted 5 lines
Quoted 4 lines
and the one that I saw when I tried to mount a v4.0 server with a v4.1 client which caused a segfault.
NFS4ERR_MINOR_VERS_MISMATCH.Should never happen on a v4.0 client...
Hmm...
That said, it wouldn't harm to add the
MINOR_VERS_MISMATCHerror to nfs_errtbl[]. I suppose the only thing we can do is to map it to EIO, but that would be better than letting it slip through the cracks...--
Trond Myklebust
Linux NFS client maintainerNetApp
[email protected]
www.netapp.com