* [Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield
@ 2016-11-28 8:58 Yang Wei
2016-11-28 15:43 ` Fam Zheng
0 siblings, 1 reply; 2+ messages in thread
From: Yang Wei @ 2016-11-28 8:58 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-block, w90p710
mirror_yield is defined in block/trace-event, just like the following:
mirror_yield(void *s, int64_t cnt, int buf_free_count, int in_flight)
so we should exchange arguement 2 and 4 while invoking it.
Signed-off-by: Yang Wei <w90p710@gmail.com>
---
block/mirror.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 301ba92..2846a2e 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -577,7 +577,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;
}
@@ -730,7 +730,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.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield
2016-11-28 8:58 [Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield Yang Wei
@ 2016-11-28 15:43 ` Fam Zheng
0 siblings, 0 replies; 2+ messages in thread
From: Fam Zheng @ 2016-11-28 15:43 UTC (permalink / raw)
To: Yang Wei; +Cc: qemu-devel, qemu-block
On Mon, 11/28 16:58, Yang Wei wrote:
> mirror_yield is defined in block/trace-event, just like the following:
> mirror_yield(void *s, int64_t cnt, int buf_free_count, int in_flight)
> so we should exchange arguement 2 and 4 while invoking it.
>
> Signed-off-by: Yang Wei <w90p710@gmail.com>
> ---
> block/mirror.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index 301ba92..2846a2e 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -577,7 +577,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;
> }
> @@ -730,7 +730,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.10.2
>
>
Reviewed-by: Fam Zheng <famz@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-28 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 8:58 [Qemu-devel] [PATCH] block/mirror: Fix passing wrong argument to trace_mirror_yield Yang Wei
2016-11-28 15:43 ` Fam Zheng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.