[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 29/34] blockdev: Fix regression with the default n
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL v2 29/34] blockdev: Fix regression with the default naming of throttling groups |
Date: |
Wed, 13 Jul 2016 14:50:36 +0200 |
From: Alberto Garcia <address@hidden>
When I/O limits are set for a block device, the name of the throttling
group is taken from the BlockBackend if the user doesn't specify one.
Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in
blockdev_init() to the end of the function, after I/O limits are set.
The consequence is that the throttling group gets an empty name.
Signed-off-by: Alberto Garcia <address@hidden>
Reported-by: Stefan Hajnoczi <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Message-id: address@hidden
[mreitz: Use existing "id" variable instead of new "blk_id"]
Signed-off-by: Max Reitz <address@hidden>
---
blockdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index aa23dc2..384ad3b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -512,6 +512,8 @@ static BlockBackend *blockdev_init(const char *file, QDict
*bs_opts,
writethrough = !qemu_opt_get_bool(opts, BDRV_OPT_CACHE_WB, true);
+ id = qemu_opts_id(opts);
+
qdict_extract_subqdict(bs_opts, &interval_dict, "stats-intervals.");
qdict_array_split(interval_dict, &interval_list);
@@ -616,7 +618,7 @@ static BlockBackend *blockdev_init(const char *file, QDict
*bs_opts,
/* disk I/O throttling */
if (throttle_enabled(&cfg)) {
if (!throttling_group) {
- throttling_group = blk_name(blk);
+ throttling_group = id;
}
blk_io_limits_enable(blk, throttling_group);
blk_set_io_limits(blk, &cfg);
@@ -625,7 +627,7 @@ static BlockBackend *blockdev_init(const char *file, QDict
*bs_opts,
blk_set_enable_write_cache(blk, !writethrough);
blk_set_on_error(blk, on_read_error, on_write_error);
- if (!monitor_add_blk(blk, qemu_opts_id(opts), errp)) {
+ if (!monitor_add_blk(blk, id, errp)) {
blk_unref(blk);
blk = NULL;
goto err_no_bs_opts;
--
1.8.3.1
- [Qemu-devel] [PULL v2 19/34] commit: Fix use of error handling policy, (continued)
- [Qemu-devel] [PULL v2 19/34] commit: Fix use of error handling policy, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 14/34] coroutine: use QSIMPLEQ instead of QTAILQ, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 18/34] block/qdev: Allow configuring WCE with qdev properties, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 20/34] block/qdev: Allow configuring rerror/werror with qdev properties, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 16/34] coroutine: move entry argument to qemu_coroutine_create, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 25/34] qemu-io: Use correct range limitations, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 26/34] qcow2: Fix qcow2_get_cluster_offset(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 24/34] qcow2: Avoid making the L1 table too big, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 28/34] vmdk: fix metadata write regression, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 22/34] block: Remove BB options from blockdev-add, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 29/34] blockdev: Fix regression with the default naming of throttling groups,
Kevin Wolf <=
- [Qemu-devel] [PULL v2 31/34] hmp: use snapshot name to determine whether a snapshot is 'fully available', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 30/34] qemu-iotests: Test naming of throttling groups, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 21/34] qemu-iotests: Test setting WCE with qdev, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 23/34] qemu-img: Use strerror() for generic resize error, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 27/34] Improve block job rate limiting for small bandwidth values, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 32/34] hmp: show all of snapshot info on every block dev in output of 'info snapshots', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 34/34] iotests: Make 157 actually format-agnostic, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 33/34] vvfat: Fix qcow write target driver specification, Kevin Wolf, 2016/07/13
- Re: [Qemu-devel] [PULL v2 00/34] Block layer patches, Peter Maydell, 2016/07/14