From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmB1m-0007yC-1R for qemu-devel@nongnu.org; Thu, 09 Mar 2017 22:15:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmB1k-00040Z-VJ for qemu-devel@nongnu.org; Thu, 09 Mar 2017 22:15:38 -0500 From: Eric Blake Date: Thu, 9 Mar 2017 21:15:21 -0600 Message-Id: <20170310031521.630-1-eblake@redhat.com> Subject: [Qemu-devel] [PATCH for-2.9] mirror: Fix backwards mirror_yield parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, Jeff Cody , Max Reitz 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 --- 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) { -- 2.9.3