Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Weston Andros Adamson <dros@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: Fix SP4_MACH_CRED negotiation in EXCHANGE_ID
Date: Mon, 5 Aug 2013 16:42:00 -0400	[thread overview]
Message-ID: <20130805204200.GE1583@fieldses.org> (raw)
In-Reply-To: <1375732027-4905-1-git-send-email-dros@netapp.com>

On Mon, Aug 05, 2013 at 03:47:07PM -0400, Weston Andros Adamson wrote:
>  - don't BUG_ON() when not SP4_NONE
>  - calculate recv and send reserve sizes correctly

Looks good, thanks!  (Ouch to that BUG_ON...).

Could I get the client-side code you're using to test this?

It's fine if it's a mess, I just want to be able to run it once and see
a mount work.

--b.

> Signed-off-by: Weston Andros Adamson <dros@netapp.com>
> ---
>  fs/nfsd/nfs4proc.c | 2 +-
>  fs/nfsd/nfs4xdr.c  | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 0d4c410..419572f 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1524,7 +1524,7 @@ static inline u32 nfsd4_write_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
>  static inline u32 nfsd4_exchange_id_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
>  {
>  	return (op_encode_hdr_size + 2 + 1 + /* eir_clientid, eir_sequenceid */\
> -		1 + 1 + 0 + /* eir_flags, spr_how, SP4_NONE (for now) */\
> +		1 + 1 + 2 + /* eir_flags, spr_how, spo_must_enforce & _allow */\
>  		2 + /*eir_server_owner.so_minor_id */\
>  		/* eir_server_owner.so_major_id<> */\
>  		XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + 1 +\
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 0c0f3ea9..c2a4701 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -3360,7 +3360,8 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
>  		8 /* eir_clientid */ +
>  		4 /* eir_sequenceid */ +
>  		4 /* eir_flags */ +
> -		4 /* spr_how (SP4_NONE) */ +
> +		4 /* spr_how */ +
> +		8 /* spo_must_enforce, spo_must_allow */ +
>  		8 /* so_minor_id */ +
>  		4 /* so_major_id.len */ +
>  		(XDR_QUADLEN(major_id_sz) * 4) +
> @@ -3372,8 +3373,6 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
>  	WRITE32(exid->seqid);
>  	WRITE32(exid->flags);
>  
> -	/* state_protect4_r. Currently only support SP4_NONE */
> -	BUG_ON(exid->spa_how != SP4_NONE);
>  	WRITE32(exid->spa_how);
>  	switch (exid->spa_how) {
>  	case SP4_NONE:
> -- 
> 1.7.12.4 (Apple Git-37)
> 

  reply	other threads:[~2013-08-05 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 19:47 [PATCH] nfsd: Fix SP4_MACH_CRED negotiation in EXCHANGE_ID Weston Andros Adamson
2013-08-05 20:42 ` J. Bruce Fields [this message]
2013-08-05 20:50   ` Adamson, Dros
2013-08-05 21:03     ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130805204200.GE1583@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=dros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox