qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight A


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation
Date: Mon, 14 Jan 2013 13:56:10 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 12, 2012 at 02:46:30PM +0100, Paolo Bonzini wrote:
> @@ -137,21 +163,58 @@ static void coroutine_fn 
> mirror_iteration(MirrorBlockJob *s)
>          bdrv_round_to_clusters(s->target,
>                                 sector_num, nb_sectors_chunk,
>                                 &sector_num, &nb_sectors);
> -        bitmap_set(s->cow_bitmap, sector_num / nb_sectors_chunk,
> -                   nb_sectors / nb_sectors_chunk);
> +
> +        /* The rounding may make us copy sectors before the
> +         * first dirty one.
> +         */
> +        cluster_num = sector_num / nb_sectors_chunk;
> +    }
> +
> +    /* Wait for I/O to this cluster (from a previous iteration) to be done.  
> */
> +    while (test_bit(cluster_num, s->in_flight_bitmap)) {
> +        trace_mirror_yield_in_flight(s, sector_num, s->in_flight);
> +        qemu_coroutine_yield();
>      }

in_flight_bitmap is never set in this patch.  Either you'll set it in a
later patch or this is a bug?

Why can we get away with testing only cluster_num and not all bits up to
and including cluster_num + nb_chunks?  Is there an assumption that
requests are issued in ascending order?



reply via email to

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