aboutsummaryrefslogtreecommitdiff
path: root/block/block-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/block-backend.c')
-rw-r--r--block/block-backend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index 18e543780d..ab75da32c9 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1752,8 +1752,10 @@ void blk_set_aio_context(BlockBackend *blk, AioContext *new_context)
if (bs) {
if (tgm->throttle_state) {
+ bdrv_drained_begin(bs);
throttle_group_detach_aio_context(tgm);
throttle_group_attach_aio_context(tgm, new_context);
+ bdrv_drained_end(bs);
}
bdrv_set_aio_context(bs, new_context);
}