qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	qemu-devel@nongnu.org, Greg Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/3] 9pfs: use V9fsBlob to transmit xattr
Date: Mon, 11 Jan 2016 14:05:39 +0000	[thread overview]
Message-ID: <20160111140538.GO26419@citrix.com> (raw)
In-Reply-To: <87egdote20.fsf@linux.vnet.ibm.com>

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	other threads:[~2016-01-11 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11  9:29 [Qemu-devel] [PATCH v3 0/3] 9pfs: disentangling virtio and generic code Wei Liu
2016-01-11  9:29 ` [Qemu-devel] [PATCH v3 1/3] fsdev: 9p-marshal: introduce V9fsBlob Wei Liu
2016-01-11  9:29 ` [Qemu-devel] [PATCH v3 2/3] 9pfs: use V9fsBlob to transmit xattr Wei Liu
2016-01-11 13:56   ` Aneesh Kumar K.V
2016-01-11 14:05     ` Wei Liu [this message]
2016-01-11 14:26       ` Aneesh Kumar K.V
2016-01-11 15:02         ` Wei Liu
2016-01-11  9:29 ` [Qemu-devel] [PATCH v3 3/3] 9pfs: introduce V9fsVirtioState Wei Liu
2016-01-11  9:37 ` [Qemu-devel] [PATCH v3 0/3] 9pfs: disentangling virtio and generic code Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160111140538.GO26419@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).