Re: [PATCH 23/50] nfsd4: "backfill" using write_bytes_to_xdr_buf

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

 



On Sun, Mar 23, 2014 at 10:43:44AM -0400, J. Bruce Fields wrote:
> By the end of the series, most xdr encoding looks like
> 
> 	p = xdr_reserve_space(xdr, <nbytes>);
> 
> 	*p++ = cpu_to_be32(<some value>);
> 	p = xdr_encode_something_more_complicated(p, <some struct>);
> 	...
> 
> It doesn't require the encoders to know much about xdr_buf's.
> 
> The main exception is read, especially the splice case.  We could
> probably do better there, I just haven't thought much about it yet.
> 
> Hm, but maybe what you're asking for here is just a
> write_bytes_to_xdr_buf wrapper that takes the xdr_stream instead of an
> xdr_buf, and a corresponding function to read xdr->buf->len when we want
> an offset?  OK, maybe so.

I was thinking of something like that, but looking over the rest of the
series I don't think it fits in here.  I like the way where your series
is moving the XDR code, and that seems enough for now.

--
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