[pnfs] [PATCH 04/10] pnfs: update client layout xdr for draft 19.

Marc Eshel eshel at almaden.ibm.com
Fri Feb 8 18:13:03 EST 2008


I made all changes Benny and Andy suggested for this patch except for 
lrf_body. Maybe Benny can add this code since I don't know how much space 
to give this opaque field.
Marc.

pnfs-bounces at linux-nfs.org wrote on 02/08/2008 08:03:54 AM:

> Dean Hildebrand wrote:
> > Signed-off-by: Dean Hildebrand <dhildeb at us.ibm.com>
> > ---

.....

> >  #define decode_pnfs_layoutcommit_maxsz   (3 + op_decode_hdr_maxsz)
> > -#define encode_pnfs_layoutreturn_sz   (8 + op_encode_hdr_maxsz)
> > -#define decode_pnfs_layoutreturn_maxsz   (op_decode_hdr_maxsz)
> > +#define encode_pnfs_layoutreturn_sz   (8 + op_encode_hdr_maxsz + \
> > +                encode_stateid_maxsz)
> > 
> 
> was "opaque          lrf_body<>" taken into account?
> 
> 
....

> > @@ -1881,9 +1880,10 @@ static int encode_pnfs_layoutreturn(struct 
> xdr_stream *xdr,
> >     WRITE32(args->lseg.iomode);
> >     WRITE32(args->return_type);
> >     if (args->return_type == RETURN_FILE) {
> > -      RESERVE_SPACE(16);
> > +      RESERVE_SPACE(16 + NFS4_STATEID_SIZE);
> >        WRITE64(args->lseg.offset);
> >        WRITE64(args->lseg.length);
> > +      WRITEMEM(&args->stateid.data, NFS4_STATEID_SIZE);
> > 
> 
> There's an opaque lrf_body missing here.
> For now we need to encode a size of 0, but in the future this is
> metadata the layout driver needs to be able to encode.
> 



More information about the pNFS mailing list