diff options
author | Denis V. Lunev <den@openvz.org> | 2016-01-20 10:12:20 +0300 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:29:55 -0600 |
commit | 756e5967d14ab3db3b295a39bdac8d398cf8932a (patch) | |
tree | 632570b4d72e6f26104a9844ca11fae4e535b3db /nbd/server.c | |
parent | 65380f6e0c4678fda64002020341a9a234c1e469 (diff) | |
download | hqemu-756e5967d14ab3db3b295a39bdac8d398cf8932a.zip hqemu-756e5967d14ab3db3b295a39bdac8d398cf8932a.tar.gz |
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>
Diffstat (limited to 'nbd/server.c')
-rw-r--r-- | nbd/server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c index 2265cb0..256feaf 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -671,7 +671,9 @@ NBDExport *nbd_export_new(BlockBackend *blk, off_t dev_offset, off_t size, * that BDRV_O_INACTIVE is cleared and the image is ready for write * access since the export could be available before migration handover. */ + aio_context_acquire(exp->ctx); blk_invalidate_cache(blk, NULL); + aio_context_release(exp->ctx); return exp; fail: |