diff options
-rw-r--r-- | block.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5265,6 +5265,10 @@ void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context) { AioContext *ctx = bdrv_get_aio_context(bs); + if (ctx == new_context) { + return; + } + aio_disable_external(ctx); bdrv_parent_drained_begin(bs, NULL, false); bdrv_drain(bs); /* ensure there are no in-flight requests */ |