public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Benny Halevy <bhalevy@panasas.com>
Cc: pnfs@linux-nfs.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 20/44] nfsd41: remove iovlen field from nfsd4_compound_state
Date: Thu, 18 Jun 2009 17:59:32 -0400	[thread overview]
Message-ID: <20090618215932.GG12234@fieldses.org> (raw)
In-Reply-To: <1245115210-7460-1-git-send-email-bhalevy@panasas.com>

On Tue, Jun 16, 2009 at 04:20:10AM +0300, Benny Halevy wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Set resp->p in nfsd4_replay_cache_entry so that the nfs4svc_encode_compoundres
> iov_len calculation is correct.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
>  fs/nfsd/nfs4state.c       |    2 +-
>  fs/nfsd/nfs4xdr.c         |    5 +----
>  include/linux/nfsd/xdr4.h |    1 -
>  3 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index c975719..0f740c1 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1092,7 +1092,7 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,
>  
>  	resp->rqstp->rq_resused = entry->ce_resused;
>  	resp->opcnt = slot->sl_opcnt;
> -	resp->cstate.iovlen = entry->ce_datav.iov_len + entry->ce_rpchdrlen;
> +	resp->p = resp->cstate.datap + XDR_QUADLEN(slot->sl_datalen);

So before this patch (but after the patch that switched over to the new
cache), was cstate.iovlen being calculated correctly, or are the
cd_datav fields wrong at this point?  In which case this series isn't
really bisectable.

--b.

>  	status = slot->sl_status;
>  
>  	return status;
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 5018483..cebde87 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -3314,10 +3314,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
>  	iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base;
>  	BUG_ON(iov->iov_len > PAGE_SIZE);
>  	if (nfsd4_has_session(&resp->cstate)) {
> -		if (resp->cstate.status == nfserr_replay_cache &&
> -				!nfsd4_not_cached(resp)) {
> -			iov->iov_len = resp->cstate.iovlen;
> -		} else {
> +		if (resp->cstate.status != nfserr_replay_cache) {
>  			nfsd4_store_cache_entry(resp);
>  			dprintk("%s: SET SLOT STATE TO AVAILABLE\n", __func__);
>  			resp->cstate.slot->sl_inuse = 0;
> diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
> index 6febc62..76569d2 100644
> --- a/include/linux/nfsd/xdr4.h
> +++ b/include/linux/nfsd/xdr4.h
> @@ -53,7 +53,6 @@ struct nfsd4_compound_state {
>  	struct nfsd4_slot	*slot;
>  	__be32			*statp;
>  	__be32			*datap;
> -	size_t			iovlen;
>  	u32			minorversion;
>  	u32			status;
>  };
> -- 
> 1.6.3
> 

      reply	other threads:[~2009-06-18 21:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16  1:20 [PATCH 20/44] nfsd41: remove iovlen field from nfsd4_compound_state Benny Halevy
2009-06-18 21:59 ` J. Bruce Fields [this message]

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=20090618215932.GG12234@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pnfs@linux-nfs.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