summaryrefslogtreecommitdiffstats
path: root/nbd
diff options
context:
space:
mode:
authorKevin Wolf2019-05-24 10:41:34 +0200
committerKevin Wolf2019-06-04 15:22:22 +0200
commit45e92a9011bff4f6660dae1e011083c5790d121b (patch)
tree6ebb02a0a6f72535f95f9c356fdd2ec7224e34ae /nbd
parenttest-block-iothread: Check filter node in test_propagate_mirror (diff)
downloadqemu-45e92a9011bff4f6660dae1e011083c5790d121b.tar.gz
qemu-45e92a9011bff4f6660dae1e011083c5790d121b.tar.xz
qemu-45e92a9011bff4f6660dae1e011083c5790d121b.zip
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 <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c
index e21bd501dc..d1375350bc 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);