qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.9] mirror: Fix backwards mirror_yield para


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.9] mirror: Fix backwards mirror_yield parameters
Date: Thu, 9 Mar 2017 21:25:54 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

[adding Stefan in cc, as trace maintainer]

On 03/09/2017 09:15 PM, Eric Blake wrote:

Perhaps I should update the subject to mention trace?

> trace-events lists the parameters for mirror_yield consistently
> with other events (cnt just after s, like in mirror_before_sleep;
> in_flight last, like in mirror_yield_in_flight).  But the callers
> were passing parameters in the wrong order, leading to poor trace
> messages, including type truncation when there are more than 4G
> dirty sectors involved.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
>  block/mirror.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/mirror.c b/block/mirror.c
> index 4f3a5cb..1c403c5 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -633,7 +633,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJob 
> *s)
>              }
> 
>              if (s->in_flight >= MAX_IN_FLIGHT) {
> -                trace_mirror_yield(s, s->in_flight, s->buf_free_count, -1);
> +                trace_mirror_yield(s, -1, s->buf_free_count, s->in_flight);
>                  mirror_wait_for_io(s);
>                  continue;
>              }
> @@ -808,7 +808,7 @@ static void coroutine_fn mirror_run(void *opaque)
>              s->common.iostatus == BLOCK_DEVICE_IO_STATUS_OK) {
>              if (s->in_flight >= MAX_IN_FLIGHT || s->buf_free_count == 0 ||
>                  (cnt == 0 && s->in_flight > 0)) {
> -                trace_mirror_yield(s, s->in_flight, s->buf_free_count, cnt);
> +                trace_mirror_yield(s, cnt, s->buf_free_count, s->in_flight);
>                  mirror_wait_for_io(s);
>                  continue;
>              } else if (cnt != 0) {
> 

-- 
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]