RE: [PATCH 10/14] SQUASHME: nfs41: sunrpc: Don't skip past the RPC call direction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Benny Halevy [mailto:bhalevy@xxxxxxxxxxx]
> Sent: Sunday, June 14, 2009 7:35 AM
> To: Labiaga, Ricardo
> Cc: Myklebust, Trond; pnfs@xxxxxxxxxxxxx; linux-nfs@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 10/14] SQUASHME: nfs41: sunrpc: Don't skip past
the
> RPC call direction
> 
> On Jun. 12, 2009, 1:54 -0400, Ricardo Labiaga
<Ricardo.Labiaga@xxxxxxxxxx>
> wrote:
> > [squash with: nfs41: Skippast the RPC call direction]
> >
> > xs_tcp_read_data() has been modified to include the RPC call
direction
> in the
> > XDR buffer.  We need to read the direction during the header
> verification.
> >
> > Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@xxxxxxxxxx>
> > ---
> >  net/sunrpc/clnt.c |   12 ++++++------
> >  1 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> > index e7fffd2..d5a85a9 100644
> > --- a/net/sunrpc/clnt.c
> > +++ b/net/sunrpc/clnt.c
> > @@ -1507,12 +1507,12 @@ rpc_verify_header(struct rpc_task *task)
> >  	if ((len -= 3) < 0)
> >  		goto out_overflow;
> >
> > -	/*
> > -	 * Skip the XID and call direction.
> > -	 * The underlying transport has read the XID and RPC call
direction
> > -	 * to determine this is an RPC reply.
> > -	 */
> > -	p += 2;
> > +	p += 1; /* skip XID */
> > +	if ((n = ntohl(*p++)) != RPC_REPLY) {
> > +		dprintk("RPC: %5u %s: not an RPC reply: %x\n",
> > +			task->tk_pid, __func__, n);
> > +		goto out_garbage;
> > +	}
> >
> >  	if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) {
> >  		if (--len < 0)
> 
> BTW, for bisectability reasons it looks like this patch needs to
> be part of the previous patch:
> "[PATCH 09/14] SQUASHME: nfs41: sunrpc: Add RPC direction back into
the
> XDR buffer"
> Otherwise it introduces a bug that this patch fixes.
> (just a nit, not that it matters much if both are to be squashed
> into the same patch eventually)
> 

This patch obliterates the patch that introduced this functionality
completely.  It removes the changes made by the original patch " nfs41:
Skip past the RPC call direction" line by line.  The reason it's a
separate patch is because it makes the original patch disappear - we'll
never submit it.  I was intending to simply remove the initial patch
(and this one) using git-rebase this week at bakeathon.

- ricardo

> Benny
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux