From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH 4/7] nfsd: nfs4xdr encode_stateid helper function Date: Wed, 13 Aug 2008 11:01:53 -0400 Message-ID: <20080813150153.GE21004@fieldses.org> References: <48A1CB0C.4090906@panasas.com> <1218563107-25393-1-git-send-email-bhalevy@panasas.com> <20080812183941.GB30729@fieldses.org> <48A28CE9.3080400@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: NFS list , pNFS Mailing List , Chuck Lever To: Benny Halevy Return-path: Received: from mail.fieldses.org ([66.93.2.214]:52884 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbYHMPB4 (ORCPT ); Wed, 13 Aug 2008 11:01:56 -0400 In-Reply-To: <48A28CE9.3080400@panasas.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Wed, Aug 13, 2008 at 10:27:37AM +0300, Benny Halevy wrote: > On Aug. 12, 2008, 21:39 +0300, "J. Bruce Fields" wrote: > > On Tue, Aug 12, 2008 at 08:45:07PM +0300, Benny Halevy wrote: > >> Signed-off-by: Benny Halevy > >> --- > >> fs/nfsd/nfs4xdr.c | 76 ++++++++++++++++++++++------------------------------ > >> 1 files changed, 32 insertions(+), 44 deletions(-) > >> > >> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c > >> index 4ec52f9..96da1aa 100644 > >> --- a/fs/nfsd/nfs4xdr.c > >> +++ b/fs/nfsd/nfs4xdr.c > > ... > >> @@ -2083,12 +2091,9 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lo > >> { > >> ENCODE_SEQID_OP_HEAD; > >> > >> - if (!nfserr) { > >> - RESERVE_SPACE(4 + sizeof(stateid_t)); > > > > Hm, so that was a little over before (a harmless error, but better to > > have it fixed). > > True. I can add a preliminary patch fixing that. Eh, it's minor. (In future, yes, I'd prefer things split out that way, but I don't think it's worth redoing for something this small.) --b. > > Benny > > > > > --b. > > > >> - WRITE32(lock->lk_resp_stateid.si_generation); > >> - WRITEMEM(&lock->lk_resp_stateid.si_opaque, sizeof(stateid_opaque_t)); > >> - ADJUST_ARGS();