nbd-server: Call blk_set_allow_aio_context_change()
commit45e92a9011bff4f6660dae1e011083c5790d121b
authorKevin Wolf <kwolf@redhat.com>
Fri, 24 May 2019 08:41:34 +0000 (24 10:41 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2019 13:22:22 +0000 (4 15:22 +0200)
tree6ebb02a0a6f72535f95f9c356fdd2ec7224e34ae
parent087ba459a222cb022ce79110eebef190b8ec854a
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>
nbd/server.c
tests/qemu-iotests/240
tests/qemu-iotests/240.out