mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
@@ -2570,8 +2570,6 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
blk_apply_root_state(blk, medium_bs);
|
||||
|
||||
bdrv_add_key(medium_bs, NULL, &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
@@ -2596,6 +2594,8 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
blk_apply_root_state(blk, medium_bs);
|
||||
|
||||
qmp_blockdev_close_tray(device, errp);
|
||||
|
||||
fail:
|
||||
|
||||
Reference in New Issue
Block a user