All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: Jevon Qiao <scaleqiao@gmail.com>
Cc: haomaiwang@gmail.com, mst@redhat.com, qemu-devel@nongnu.org,
	aneesh.kumar@linux.vnet.ibm.com, sage@newdream.net,
	ceph-devel@vger.kernel.org, gfarnum@redhat.com
Subject: Re: [Qemu-devel] [PATCH] hw/9pfs: Add CephFS support in VirtFS
Date: Wed, 13 Apr 2016 16:20:05 +0200	[thread overview]
Message-ID: <20160413162005.37b9f516@bahia.huguette.org> (raw)
In-Reply-To: <5709F8FB.1040005@gmail.com>

Hi Jevon,

On Sun, 10 Apr 2016 14:55:55 +0800
Jevon Qiao <scaleqiao@gmail.com> wrote:

> Hi Greg,
> 
> Thank you for spending time reviewing this patch.
> On 7/4/16 23:50, Greg Kurz wrote:
> > On Tue, 15 Mar 2016 00:02:48 +0800
> > Jevon Qiao <scaleqiao@gmail.com> wrote:
> >  
> >> Ceph as a promising unified distributed storage system is widely used in the
> >> world of OpenStack. OpenStack users deploying Ceph for block (Cinder) and
> >> object (S3/Swift) are unsurprisingly looking at Manila and CephFS to round out
> >> a unified storage solution. Since the typical hypervisor people are using is
> >> Qemu/KVM, it is necessary to provide a high performance, easy to use, file
> >> system service in it. VirtFS aims to offers paravirtualized system services and
> >> simple passthrough for directories from host to guest, which currently only
> >> support local file system, this patch wants to add CephFS support in VirtFS.
> >>
> >> Signed-off-by: Jevon Qiao <scaleqiao@gmail.com>
> >> ---  
> > Jevon,
> >
> > There's still work to be done on this patch.
> >
> > One general remark is that there are far too many traces: it obfuscates the code
> > and does not bring much benefit in my opinion. If you look at the other fsdev
> > drivers, you see they don't do traces at all !
> > Also, I've found several errors where the code simply cannot work... please run
> > a file/io oriented testsuite in the guest to check all the fsdev operations are
> > working as expected... maybe some tests from LTP ?  

Please leave at least one empty line before...

> Well, I did run some tests against this patch with iozone to guarantee 
> the IO path is correct and did some manual tests to make sure that the 
> basic file/directory operations work. Anyway, I will run the file system 
> related parts of LTP.

... and after your comments, so that we see them well.

Unless I've missed something, you had only one question.

> [...]
> >> +#ifndef HAVE_CEPH_READV
> >> +static ssize_t ceph_preadv(struct ceph_mount_info *cmount, int fd,
> >> +                           const struct iovec *iov, int iov_cnt,
> >> +                           off_t offset)
> >> +{
> >> +    ssize_t ret;
> >> +    size_t i;
> >> +    size_t len, tmp;
> >> +    void *buf;
> >> +    size_t bufoffset = 0;
> >> +
> >> +    len = iov_size(iov, iov_cnt);
> >> +    buf = g_new0(uint8_t, len);
> >> +    ret = ceph_read(cmount, fd, buf, len, offset);
> >> +    if (ret < 0) {
> >> +        return ret;  
> > buf is leaked.
> >  
> >> +    } else {
> >> +        tmp = ret;
> >> +        for (i = 0; (i < iov_cnt && tmp > 0); i++) {  
> > tmp is <= to the sum of all iov_len: unless I miss something, it
> > isn't possible for i to reach iov_cnt. Also the parenthesis aren't
> > needed.  
> So do you mean only tmp>0 is needed here?

That's my point, yes.

Cheers.

--
Greg


  reply	other threads:[~2016-04-13 14:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 16:02 [PATCH] hw/9pfs: Add CephFS support in VirtFS Jevon Qiao
2016-03-15  9:30 ` Greg Kurz
2016-03-15  9:30   ` [Qemu-devel] " Greg Kurz
2016-03-15 13:39   ` Jevon Qiao
2016-03-15 13:39     ` [Qemu-devel] " Jevon Qiao
2016-03-15 13:46     ` Greg Kurz
2016-03-15 13:46       ` [Qemu-devel] " Greg Kurz
2016-03-15 14:16       ` Jevon Qiao
2016-03-15 14:16         ` [Qemu-devel] " Jevon Qiao
2016-04-05 15:27         ` Jevon Qiao
2016-04-05 15:27           ` [Qemu-devel] " Jevon Qiao
2016-04-05 15:31           ` Greg Kurz
2016-04-05 15:31             ` [Qemu-devel] " Greg Kurz
2016-04-06  4:28             ` Jevon Qiao
2016-04-06  4:28               ` [Qemu-devel] " Jevon Qiao
2016-03-15 13:52 ` Michael S. Tsirkin
2016-03-15 13:52   ` [Qemu-devel] " Michael S. Tsirkin
2016-03-15 14:33   ` Jevon Qiao
2016-03-15 14:33     ` [Qemu-devel] " Jevon Qiao
2016-04-07 15:50 ` Greg Kurz
2016-04-07 15:50   ` [Qemu-devel] " Greg Kurz
2016-04-10  6:55   ` Jevon Qiao
2016-04-10  6:55     ` [Qemu-devel] " Jevon Qiao
2016-04-13 14:20     ` Greg Kurz [this message]
2016-04-16 18:53   ` Aneesh Kumar K.V
2016-04-16 18:53     ` [Qemu-devel] " Aneesh Kumar K.V
2016-04-15 12:01 ` Greg Kurz
2016-04-15 12:01   ` [Qemu-devel] " Greg Kurz
2016-04-15 13:21 ` Greg Kurz
2016-04-15 13:21   ` [Qemu-devel] " Greg Kurz
  -- strict thread matches above, loose matches on Subject: below --
2016-03-02 15:41 Jevon Qiao
2016-03-08  0:51 ` Jevon Qiao
2016-03-09  9:59   ` Greg Kurz
2016-03-09 19:02 ` Greg Kurz
2016-03-09 20:09   ` Eric Blake
2016-03-10  9:08     ` Greg Kurz
2016-03-10  9:08       ` Greg Kurz
2016-03-14  2:02   ` Jevon Qiao

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=20160413162005.37b9f516@bahia.huguette.org \
    --to=gkurz@linux.vnet.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=gfarnum@redhat.com \
    --cc=haomaiwang@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sage@newdream.net \
    --cc=scaleqiao@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.