[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 12/61] migration: hold AioContext lock for loadvm qem
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 12/61] migration: hold AioContext lock for loadvm qemu_fclose() |
Date: |
Fri, 23 Jun 2017 18:21:10 +0200 |
From: Stefan Hajnoczi <address@hidden>
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>
Signed-off-by: Kevin Wolf <address@hidden>
---
migration/savevm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index b08df04..c7a49c9 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2300,11 +2300,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;
--
1.8.3.1
- [Qemu-block] [PULL 01/61] commit: Fix completion with extra reference, (continued)
- [Qemu-block] [PULL 01/61] commit: Fix completion with extra reference, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 02/61] qemu-iotests: Allow starting new qemu after cleanup, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 04/61] block: count bdrv_co_rw_vmstate() requests, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 03/61] qemu-iotests: Test exiting qemu with running job, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 05/61] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 06/61] migration: avoid recursive AioContext locking in save_vmstate(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 07/61] migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 10/61] throttle: Update throttle-groups.c documentation, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 09/61] doc: Document driver-specific -blockdev options, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 08/61] doc: Document generic -blockdev options, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 12/61] migration: hold AioContext lock for loadvm qemu_fclose(),
Kevin Wolf <=
- [Qemu-block] [PULL 13/61] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 14/61] qemu-iotests: 068: use -drive/-device instead of -hda, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 15/61] qemu-iotests: 068: test iothread mode, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 17/61] qcow2: Remove unused Error variable in do_perform_cow(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 18/61] qcow2: Use unsigned int for both members of Qcow2COWRegion, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 20/61] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write(), Kevin Wolf, 2017/06/23