Re: [PATCH v3 12/29] pnfs-obj: decode layout, alloc/free lseg

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

 



On 05/19/2011 12:13 AM, Benny Halevy wrote:
<snip>
>> +/*
>> + * Unmarshall layout and store it in pnfslay.
>> + */
>> +struct pnfs_layout_segment *
>> +objlayout_alloc_lseg(struct pnfs_layout_hdr *pnfslay,
>> +		     struct nfs4_layoutget_res *lgr)
>> +{
>> +	int status = -ENOMEM;
>> +	struct xdr_stream stream;
>> +	struct xdr_buf buf = {
>> +		.pages =  lgr->layoutp->pages,
>> +		.page_len =  lgr->layoutp->len,
>> +		.buflen =  lgr->layoutp->len,
>> +		.len = lgr->layoutp->len,
>> +	};
> 
> - layering violation
> - introduce xdr_init_decode_pages(struct xdr_stream *, struct xdr_buf *,
> pages, len);
> - use also in filelayout_decode_layout
> 
> Benny
> 
<snip>

Benny if you are at it I was looking at this code. If the Files layout does
it and objects and so will blocks. Could we construct the xdr_buf at the
generic layer (with your above func). And pass the xdr_buf* in the lgr directly.
I think it would be cleaner.

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