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