[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: |
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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 03/20] block: implement dirty bitmap using HBitmap, (continued)
- [Qemu-devel] [PATCH 03/20] block: implement dirty bitmap using HBitmap, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 05/20] mirror: perform COW if the cluster size is bigger than the granularity, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 07/20] block: allow customizing the granularity of the dirty bitmap, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 06/20] block: return count of dirty sectors, not chunks, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO, Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO,
Eric Blake <=
- [Qemu-devel] [PATCH 08/20] mirror: allow customizing the granularity, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 10/20] mirror: add buf-size argument to drive-mirror, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 12/20] mirror: support arbitrarily-sized iterations, Paolo Bonzini, 2012/12/12
- [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation, Paolo Bonzini, 2012/12/12