[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/5] migration: hold AioContext lock for loadvm qemu
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 2/5] migration: hold AioContext lock for loadvm qemu_fclose() |
Date: |
Thu, 15 Jun 2017 17:38:10 +0100 |
migration_incoming_state_destroy() uses qemu_fclose() on the vmstate
file. Make sure to call it inside an AioContext acquire/release region.
This fixes an 'qemu: qemu_mutex_unlock: Operation not permitted' abort
in loadvm.
This patch closes the vmstate file before ending the drained region.
Previously we closed the vmstate file after ending the drained region.
The order does not matter.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
migration/savevm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index ff126a1..943a43c 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2292,11 +2292,11 @@ int load_snapshot(const char *name, Error **errp)
aio_context_acquire(aio_context);
ret = qemu_loadvm_state(f);
+ migration_incoming_state_destroy();
aio_context_release(aio_context);
bdrv_drain_all_end();
- migration_incoming_state_destroy();
if (ret < 0) {
error_setg(errp, "Error %d while loading VM state", ret);
return ret;
--
2.9.4
- [Qemu-devel] [PATCH 0/5] qemu-iotests: test savevm/loadvm iothread (and make it work!), Stefan Hajnoczi, 2017/06/15
- [Qemu-devel] [PATCH 1/5] virtio-pci: use ioeventfd even when KVM is disabled, Stefan Hajnoczi, 2017/06/15
- [Qemu-devel] [PATCH 2/5] migration: hold AioContext lock for loadvm qemu_fclose(),
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Stefan Hajnoczi, 2017/06/15
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/19
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/27
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/27
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Stefan Hajnoczi, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/28
- [Qemu-devel] [PATCH 4/5] qemu-iotests: 068: use -drive/-device instead of -hda, Stefan Hajnoczi, 2017/06/15