qemu-devel
[Top][All Lists]
Advanced

[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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO
Date: Fri, 14 Dec 2012 15:11:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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?

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]