diff options
author | Kevin Wolf | 2016-03-21 10:49:51 +0100 |
---|---|---|
committer | Kevin Wolf | 2016-05-19 16:45:29 +0200 |
commit | a5614993d79584af93bb845f69f59872b3f76cf8 (patch) | |
tree | e511d519aeb53d92c3f334d7f912c988a19cdfbd /block | |
parent | Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-05-1... (diff) | |
download | qemu-a5614993d79584af93bb845f69f59872b3f76cf8.tar.gz qemu-a5614993d79584af93bb845f69f59872b3f76cf8.tar.xz qemu-a5614993d79584af93bb845f69f59872b3f76cf8.zip |
block: Make sure throttled BDSes always have a BB
It was already true in principle that a throttled BDS always has a BB
attached, except that the order of operations while attaching or
detaching a BDS to/from a BB wasn't careful enough.
This commit breaks graph manipulations while I/O throttling is enabled.
It would have been possible to keep things working with some temporary
hacks, but quite cumbersome, so it's not worth the hassle. We'll fix
things again in a minute.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index a1e2c7fa20..53fd9d2f0e 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -420,6 +420,9 @@ void blk_remove_bs(BlockBackend *blk) notifier_list_notify(&blk->remove_bs_notifiers, blk); blk_update_root_state(blk); + if (blk->root->bs->throttle_state) { + bdrv_io_limits_disable(blk->root->bs); + } blk->root->bs->blk = NULL; bdrv_root_unref_child(blk->root); |