[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count uns
From: |
Markus Armbruster |
Subject: |
[Qemu-block] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP |
Date: |
Mon, 7 Aug 2017 16:45:33 +0200 |
Byte counts should use QAPI type 'size' (uint64_t). BlockDirtyInfo
member @count is 'int' (int64_t). bdrv_query_dirty_bitmaps() computes
@count from bdrv_get_dirty_count() in uint64_t, then implicitly
converts to int64_t. Before the commit before previous, the
conversion was in bdrv_get_dirty_count() instead.
Change member @count to 'size'.
query-block now reports @count values above 2^63-1 correctly instead
of their (negative) two's complement.
Signed-off-by: Markus Armbruster <address@hidden>
---
qapi/block-core.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1c4a08d..60e1b6f 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -418,7 +418,7 @@
# Since: 1.3
##
{ 'struct': 'BlockDirtyInfo',
- 'data': {'*name': 'str', 'count': 'int', 'granularity': 'size',
+ 'data': {'*name': 'str', 'count': 'size', 'granularity': 'size',
'status': 'DirtyBitmapStatus'} }
##
--
2.7.5
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 10/56] hmp: Make balloon's argument unsigned, (continued)
[Qemu-block] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP,
Markus Armbruster <=
[Qemu-block] [RFC PATCH 35/56] blockjob: Lift speed sign conversion into block_job_set_speed(), Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 37/56] blockjob: Make BlockJobInfo and event speed unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 33/56] block: Make block_resize size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 26/56] block: Make BlockMeasureInfo sizes unsigned in QAPI, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arguments unsigned, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 27/56] block/dirty-bitmap: Clean up signed vs. unsigned dirty counts, Markus Armbruster, 2017/08/07