[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 22/31] block: Don't return throttling info in query-n
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 22/31] block: Don't return throttling info in query-named-block-nodes |
Date: |
Thu, 19 May 2016 17:22:00 +0200 |
query-named-block-nodes should not return information that is related
to the attached BlockBackend rather than the node itself, so throttling
information needs to be removed from it.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
block/qapi.c | 6 +++---
tests/qemu-iotests/096 | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index b0d8d6b..5594f74 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -67,10 +67,10 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
info->backing_file_depth = bdrv_get_backing_file_depth(bs);
info->detect_zeroes = bs->detect_zeroes;
- if (bs->blk && blk_get_public(bs->blk)->throttle_state) {
+ if (blk && blk_get_public(blk)->throttle_state) {
ThrottleConfig cfg;
- throttle_group_get_config(bs->blk, &cfg);
+ throttle_group_get_config(blk, &cfg);
info->bps = cfg.buckets[THROTTLE_BPS_TOTAL].avg;
info->bps_rd = cfg.buckets[THROTTLE_BPS_READ].avg;
@@ -118,7 +118,7 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
info->iops_size = cfg.op_size;
info->has_group = true;
- info->group = g_strdup(throttle_group_get_name(bs->blk));
+ info->group = g_strdup(throttle_group_get_name(blk));
}
info->write_threshold = bdrv_write_threshold_get(bs);
diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
index e34204b..aeeb375 100644
--- a/tests/qemu-iotests/096
+++ b/tests/qemu-iotests/096
@@ -45,8 +45,9 @@ class TestLiveSnapshot(iotests.QMPTestCase):
os.remove(self.target_img)
def checkConfig(self, active_layer):
- result = self.vm.qmp('query-named-block-nodes')
+ result = self.vm.qmp('query-block')
for r in result['return']:
+ r = r['inserted']
if r['node-name'] == active_layer:
self.assertEqual(r['group'], self.group)
self.assertEqual(r['iops'], self.iops)
--
1.8.3.1
- [Qemu-block] [PULL 20/31] block: Add bdrv_has_blk(), (continued)
- [Qemu-block] [PULL 20/31] block: Add bdrv_has_blk(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Kevin Wolf, 2016/05/19
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Paolo Bonzini, 2016/05/20
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Kevin Wolf, 2016/05/20
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Kevin Wolf, 2016/05/20
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Paolo Bonzini, 2016/05/20
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Kevin Wolf, 2016/05/20
- Re: [Qemu-block] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), Paolo Bonzini, 2016/05/20
[Qemu-block] [PULL 25/31] qcow2: fix condition in is_zero_cluster, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 28/31] block: clarify error message for qmp-eject, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 22/31] block: Don't return throttling info in query-named-block-nodes,
Kevin Wolf <=
[Qemu-block] [PULL 29/31] qemu-io: Fix recent UI updates, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 23/31] block: Remove BlockDriverState.blk, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 24/31] block: Propagate AioContext change to all children, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 27/31] qemu-iotests: Some more write_zeroes tests, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 30/31] qemu-iotests: Simplify 109 with unaligned qemu-img compare, Kevin Wolf, 2016/05/19
[Qemu-block] [PULL 31/31] qemu-iotests: Fix regression in 136 on aio_read invalid, Kevin Wolf, 2016/05/19
Re: [Qemu-block] [Qemu-devel] [PULL 00/31] Block layer patches, Peter Maydell, 2016/05/19
[Qemu-block] [PULL 00/31] Block layer patches, Kevin Wolf, 2016/05/25