[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-io: add aio read/write/flush commands
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-io: add aio read/write/flush commands |
Date: |
Sun, 28 Jun 2009 22:36:28 +0200 |
User-agent: |
Mutt/1.3.28i |
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).