public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME
@ 2014-01-13 21:54 Weston Andros Adamson
  2014-01-14 15:22 ` Boaz Harrosh
  0 siblings, 1 reply; 2+ messages in thread
From: Weston Andros Adamson @ 2014-01-13 21:54 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs, Weston Andros Adamson

Don't check for -NFS4ERR_NOTSUPP, it's already been mapped to -ENOTSUPP
by nfs4_stat_to_errno.

This allows the client to mount v4.1 servers that don't support
SECINFO_NO_NAME by falling back to the "guess and check" method of
nfs4_find_root_sec.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
---

I found this trying to mount a pynfs filelayout server.

 fs/nfs/nfs4proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 15052b8..1d57b6a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7920,7 +7920,7 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
 		switch (err) {
 		case 0:
 		case -NFS4ERR_WRONGSEC:
-		case -NFS4ERR_NOTSUPP:
+		case -ENOTSUPP:
 			goto out;
 		default:
 			err = nfs4_handle_exception(server, err, &exception);
@@ -7954,7 +7954,7 @@ nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
 	 * Fall back on "guess and check" method if
 	 * the server doesn't support SECINFO_NO_NAME
 	 */
-	if (err == -NFS4ERR_WRONGSEC || err == -NFS4ERR_NOTSUPP) {
+	if (err == -NFS4ERR_WRONGSEC || err == -ENOTSUPP) {
 		err = nfs4_find_root_sec(server, fhandle, info);
 		goto out_freepage;
 	}
-- 
1.8.3.4 (Apple Git-47)


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

* Re: [PATCH] nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME
  2014-01-13 21:54 [PATCH] nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME Weston Andros Adamson
@ 2014-01-14 15:22 ` Boaz Harrosh
  0 siblings, 0 replies; 2+ messages in thread
From: Boaz Harrosh @ 2014-01-14 15:22 UTC (permalink / raw)
  To: Weston Andros Adamson; +Cc: trond.myklebust, linux-nfs, Ganesha NFS List

On 01/13/2014 11:54 PM, Weston Andros Adamson wrote:
> Don't check for -NFS4ERR_NOTSUPP, it's already been mapped to -ENOTSUPP
> by nfs4_stat_to_errno.
> 
> This allows the client to mount v4.1 servers that don't support
> SECINFO_NO_NAME by falling back to the "guess and check" method of
> nfs4_find_root_sec.
> 
> Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
> ---
> 
> I found this trying to mount a pynfs filelayout server.
> 

Yes at last BAT Frank fixed Ganesha so it can work with new clients.

Linux client is the standard the rest of the world needs to comply 
(Resistance is futile ;-) )

Thanks
Boaz

>  fs/nfs/nfs4proc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 15052b8..1d57b6a 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -7920,7 +7920,7 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
>  		switch (err) {
>  		case 0:
>  		case -NFS4ERR_WRONGSEC:
> -		case -NFS4ERR_NOTSUPP:
> +		case -ENOTSUPP:
>  			goto out;
>  		default:
>  			err = nfs4_handle_exception(server, err, &exception);
> @@ -7954,7 +7954,7 @@ nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
>  	 * Fall back on "guess and check" method if
>  	 * the server doesn't support SECINFO_NO_NAME
>  	 */
> -	if (err == -NFS4ERR_WRONGSEC || err == -NFS4ERR_NOTSUPP) {
> +	if (err == -NFS4ERR_WRONGSEC || err == -ENOTSUPP) {
>  		err = nfs4_find_root_sec(server, fhandle, info);
>  		goto out_freepage;
>  	}
> 


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

end of thread, other threads:[~2014-01-14 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-13 21:54 [PATCH] nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME Weston Andros Adamson
2014-01-14 15:22 ` Boaz Harrosh

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