From 45e92a9011bff4f6660dae1e011083c5790d121b Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 24 May 2019 10:41:34 +0200 Subject: nbd-server: Call blk_set_allow_aio_context_change() The NBD server uses an AioContext notifier, so it can tolerate that its BlockBackend is switched to a different AioContext. Before we start actually calling bdrv_try_set_aio_context(), which checks for consistency, outside of test cases, we need to make sure that the NBD server actually allows this. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- nbd/server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'nbd') diff --git a/nbd/server.c b/nbd/server.c index e21bd50..d137535 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1491,6 +1491,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset, goto fail; } blk_set_enable_write_cache(blk, !writethrough); + blk_set_allow_aio_context_change(blk, true); exp->refcount = 1; QTAILQ_INIT(&exp->clients); -- cgit v1.1