summaryrefslogtreecommitdiff
path: root/block/commit.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-07-07 07:44:40 -0500
committerKevin Wolf <kwolf@redhat.com>2017-07-10 13:18:06 +0200
commit5cb1a49e01db12a38790c982aafde94977f7b0ee (patch)
tree6326520403bcfe69910738cc2fc1bff6684f835a /block/commit.c
parentf3e4ce4af336f2ea306fa0f40ec1a5149864ca8c (diff)
downloadqemu-5cb1a49e01db12a38790c982aafde94977f7b0ee.tar.gz
trace: Show blockjob actions via bytes, not sectors
Upcoming patches are going to switch to byte-based interfaces instead of sector-based. Even worse, trace_backup_do_cow_enter() had a weird mix of cluster and sector indices. The trace interface is low enough that there are no stability guarantees, and therefore nothing wrong with changing our units, even in cases like trace_backup_do_cow_skip() where we are not changing the trace output. So make the tracing uniformly use bytes. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/commit.c')
-rw-r--r--block/commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/commit.c b/block/commit.c
index 6993994a13..4cda7f2425 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -190,7 +190,8 @@ static void coroutine_fn commit_run(void *opaque)
COMMIT_BUFFER_SIZE / BDRV_SECTOR_SIZE,
&n);
copy = (ret == 1);
- trace_commit_one_iteration(s, sector_num, n, ret);
+ trace_commit_one_iteration(s, sector_num * BDRV_SECTOR_SIZE,
+ n * BDRV_SECTOR_SIZE, ret);
if (copy) {
ret = commit_populate(s->top, s->base, sector_num, n, buf);
bytes_written += n * BDRV_SECTOR_SIZE;