mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
nbd: add missed aio_context_acquire in nbd_export_new
blk_invalidate_cache() can call qcow2_invalidate_cache which performs IO inside. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Kevin Wolf <kwolf@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1453273940-15382-3-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
fae947b096
commit
e5f3e12e84
@ -671,7 +671,9 @@ NBDExport *nbd_export_new(BlockBackend *blk, off_t dev_offset, off_t size,
|
|||||||
* that BDRV_O_INCOMING is cleared and the image is ready for write
|
* that BDRV_O_INCOMING is cleared and the image is ready for write
|
||||||
* access since the export could be available before migration handover.
|
* access since the export could be available before migration handover.
|
||||||
*/
|
*/
|
||||||
|
aio_context_acquire(exp->ctx);
|
||||||
blk_invalidate_cache(blk, NULL);
|
blk_invalidate_cache(blk, NULL);
|
||||||
|
aio_context_release(exp->ctx);
|
||||||
return exp;
|
return exp;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
Reference in New Issue
Block a user