aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-22 20:20:29 +0100
committerKevin Wolf <kwolf@redhat.com>2016-05-19 16:45:31 +0200
commit79c719b755134da3dd2ba2a63a9a7db765f68e53 (patch)
tree8978ce44a5d0e8c3061bf699b03cf06c1b1710a9 /block
parent7c8eece45b10fc9b716850345118ed6fa8d17887 (diff)
block: Don't return throttling info in query-named-block-nodes
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 <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/qapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/qapi.c b/block/qapi.c
index b0d8d6b71e..5594f74d17 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);