qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-io: add aio read/write/flush commands
Date: Sun, 28 Jun 2009 22:36:28 +0200	[thread overview]
Message-ID: <20090628203628.GB11623@lst.de> (raw)
In-Reply-To: <4A434CF7.7000503@redhat.com>

On Thu, Jun 25, 2009 at 12:09:59PM +0200, Kevin Wolf wrote:
> > +};
> > +
> > +static void
> > +aio_write_done(void *opaque, int ret)
> > +{
> > +	struct aio_ctx *ctx = opaque;
> > +	struct timeval t2;
> > +	int total;
> > +	int cnt = 1;
> 
> What is the reason for having the total and cnt variables here which are
> never modified and used only once?

None really.  It's a fallout of just taking the existing write command
and aio-ifying it.

> > +static int
> > +aio_read_f(int argc, char **argv)
> > +{
> > +	char *p;
> > +	int count = 0;
> 
> Shouldn't this be size_t?

In a perfect would it should be, in qemu it doesn't matter too much
because we use a plain int in all kinds of places that should use
a size_t (and int64_t for off_t).

      reply	other threads:[~2009-06-28 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20 19:10 [Qemu-devel] [PATCH] qemu-io: add aio read/write/flush commands Christoph Hellwig
2009-06-25 10:09 ` Kevin Wolf
2009-06-28 20:36   ` Christoph Hellwig [this message]

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=20090628203628.GB11623@lst.de \
    --to=hch@lst.de \
    --cc=kwolf@redhat.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).