[pnfs] [PATCH] filelayout_encode_layoutlist_item encodes 4 bytes of garbage

William A. (Andy) Adamson andros at citi.umich.edu
Thu Jun 7 11:44:21 EDT 2007


thanks ricardo, i'll add it.

-->Andy

On 6/7/07, Ricardo Labiaga <ricardo.labiaga at netapp.com> wrote:
>
> The encoding of dev_layout_type (32 bits) was removed from
> filelayout_encode_layoutlist_item() by commit:
>         21ea95d098e20662992c9e4f975ca998a3027878.
>
> The returned length needs to also be updated.
> This change reduces the returned length by 4 bytes to avoid XDR
> encoding a hole with trash in the buffer.
> ---
>   fs/nfsd/nfs4filelayoutxdr.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfs4filelayoutxdr.c b/fs/nfsd/nfs4filelayoutxdr.c
> index 63198e7..28badc6 100644
> --- a/fs/nfsd/nfs4filelayoutxdr.c
> +++ b/fs/nfsd/nfs4filelayoutxdr.c
> @@ -89,7 +89,7 @@ filelayout_encode_layoutlist_item(u32 *p, u32 *end,
> struct nfsd4_pnfs_layoutlist
>         int len;
>         unsigned int fhlen = item->dev_fh.fh_size;
>
> -       len = 16 + fhlen;
> +       len = 12 + fhlen;
>         if (p + XDR_QUADLEN(len) > end)
>                 return -ENOMEM;
>         WRITE32(item->dev_id);
> --
> 1.5.0.6
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20070607/26f01d0d/attachment.htm 


More information about the pNFS mailing list