qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 2/3] 9pfs: use V9fsBlob to transmit xattr


From: Wei Liu
Subject: Re: [Qemu-devel] [PATCH v3 2/3] 9pfs: use V9fsBlob to transmit xattr
Date: Mon, 11 Jan 2016 14:05:39 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Jan 11, 2016 at 07:26:39PM +0530, Aneesh Kumar K.V wrote:
[...]
> >      xattr_len = fidp->fs.xattr.len;
> >      read_count = xattr_len - off;
> > @@ -1596,14 +1597,18 @@ static int v9fs_xattr_read(V9fsState *s, V9fsPDU 
> > *pdu, V9fsFidState *fidp,
> >           */
> >          read_count = 0;
> >      }
> > -    err = pdu_marshal(pdu, offset, "d", read_count);
> > -    if (err < 0) {
> > -        return err;
> > -    }
> > -    offset += err;
> > -    err = v9fs_pack(pdu->elem.in_sg, pdu->elem.in_num, offset,
> > -                    ((char *)fidp->fs.xattr.value) + off,
> > -                    read_count);
> > +
> > +    v9fs_blob_init(&blob);
> > +
> > +    blob.data = g_malloc(read_count);
> > +    memcpy(blob.data, ((char *)fidp->fs.xattr.value) + off,
> > +           read_count);
> 
> Can we do this without the malloc and memcpy ? . I am sure you need this
> for Xen abstraction. But for now i am inclined to drop this from the
> series and add this later with Xen transport.  v9fs_xattr_read is
> essentially T_READ on a xattr fid and we don't use blob ("B") in other
> code path. We also want to avoid that extra malloc and memcpy.
> 

That's fine.

Do you want me to resend the whole series or just this one patch
(assuming you don't have other comments on my other patches)?


Wei.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]