qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 43/49] nbd: add missed aio_context_acquire in nbd_exp


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 43/49] nbd: add missed aio_context_acquire in nbd_export_new
Date: Tue, 26 Jan 2016 14:47:15 +0100

From: "Denis V. Lunev" <address@hidden>

blk_invalidate_cache() can call qcow2_invalidate_cache which performs
IO inside.

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 nbd/server.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nbd/server.c b/nbd/server.c
index eead339..3596e68 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_INCOMING 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:
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]