[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 01/11] qcow2: call CoQueue APIs under CoMutex
From: |
Paolo Bonzini |
Subject: |
[Qemu-block] [PATCH 01/11] qcow2: call CoQueue APIs under CoMutex |
Date: |
Thu, 29 Jun 2017 15:27:39 +0200 |
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 2f94f0326e..70d3f4a18e 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1741,8 +1741,6 @@ static coroutine_fn int qcow2_co_pwritev(BlockDriverState
*bs, uint64_t offset,
ret = 0;
fail:
- qemu_co_mutex_unlock(&s->lock);
-
while (l2meta != NULL) {
QCowL2Meta *next;
@@ -1756,6 +1754,8 @@ fail:
l2meta = next;
}
+ qemu_co_mutex_unlock(&s->lock);
+
qemu_iovec_destroy(&hd_qiov);
qemu_vfree(cluster_data);
trace_qcow2_writev_done_req(qemu_coroutine_self(), ret);
--
2.13.0
- [Qemu-block] [PATCH v2 00/11] Block layer thread-safety, part 2, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 01/11] qcow2: call CoQueue APIs under CoMutex,
Paolo Bonzini <=
- [Qemu-block] [PATCH 03/11] vdi: make it thread-safe, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 06/11] qed: move tail of qed_aio_write_main to qed_aio_write_{cow, alloc}, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 02/11] coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 04/11] vpc: make it thread-safe, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 08/11] qed: introduce bdrv_qed_init_state, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 05/11] vvfat: make it thread-safe, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 10/11] sheepdog: add queue_lock, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 11/11] ssh: support I/O from any AioContext, Paolo Bonzini, 2017/06/29
- [Qemu-block] [PATCH 07/11] block: invoke .bdrv_drain callback in coroutine context and from AioContext, Paolo Bonzini, 2017/06/29