[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO |
Date: |
Sat, 15 Dec 2012 04:09:58 -0500 (EST) |
----- Messaggio originale -----
> Da: "Eric Blake" <address@hidden>
> A: "Paolo Bonzini" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
> Inviato: Venerdì, 14 dicembre 2012 23:11:02
> Oggetto: Re: [PATCH 09/20] mirror: switch mirror_iteration to AIO
>
> On 12/12/2012 06:46 AM, Paolo Bonzini wrote:
> > There is really no change in the behavior of the job here, since
> > there is still a maximum of one in-flight I/O operation between
> > the source and the target. However, this patch already introduces
> > the AIO callbacks (which are unmodified in the next patch)
> > and some of the logic to count in-flight operations and only
> > complete the job when there is none.
> >
> > Signed-off-by: Paolo Bonzini <address@hidden>
> > ---
> > block/mirror.c | 155
> > +++++++++++++++++++++++++++++++++++++++++++--------------
> > trace-events | 2 +
> > 2 files changed, 119 insertions(+), 38 deletions(-)
> >
>
> > @@ -87,31 +143,30 @@ static int coroutine_fn
> > mirror_iteration(MirrorBlockJob *s,
> >
> > end = s->common.len >> BDRV_SECTOR_BITS;
> > nb_sectors = MIN(nb_sectors, end - sector_num);
> > +
> > + /* Allocate a MirrorOp that is used as an AIO callback. */
> > + op = g_slice_new(MirrorOp);
> > + op->s = s;
> > + op->iov.iov_base = s->buf;
> > + op->iov.iov_len = nb_sectors * 512;
>
> Why two spaces?
To align the equal signs. :)
Paolo
> I'm not an expert in this area of code, so my review is weak; but I
> didn't spot anything obviously wrong, so feel free to add my:
>
> Reviewed-by: Eric Blake <address@hidden>
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>