[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/15] sheepdog: fix co_recv coroutine context
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 14/15] sheepdog: fix co_recv coroutine context |
Date: |
Fri, 10 Feb 2012 13:47:43 +0100 |
From: MORITA Kazutaka <address@hidden>
The co_recv coroutine has two things that will try to enter it:
1. The select(2) read callback on the sheepdog socket.
2. The aio_add_request() blocking operations, including a coroutine
mutex.
This patch fixes it by setting NULL to co_recv before sending data.
In future, we should make the sheepdog driver fully coroutine-based
and simplify request handling.
Signed-off-by: MORITA Kazutaka <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/sheepdog.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 9416400..00276f6f 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -629,6 +629,9 @@ static void coroutine_fn aio_read_response(void *opaque)
switch (acb->aiocb_type) {
case AIOCB_WRITE_UDATA:
+ /* this coroutine context is no longer suitable for co_recv
+ * because we may send data to update vdi objects */
+ s->co_recv = NULL;
if (!is_data_obj(aio_req->oid)) {
break;
}
--
1.7.6.5
- [Qemu-devel] [PULL 00/15] Block patches, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 01/15] cutils: extract buffer_is_zero() from qemu-img.c, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 02/15] block: add .bdrv_co_write_zeroes() interface, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 03/15] block: perform zero-detection during copy-on-read, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 04/15] qed: replace is_write with flags field, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 05/15] qed: add .bdrv_co_write_zeroes() support, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 06/15] qemu-io: add write -z option for bdrv_co_write_zeroes, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 14/15] sheepdog: fix co_recv coroutine context,
Kevin Wolf <=
- [Qemu-devel] [PATCH 15/15] AHCI: Masking of IRQs actually masks them, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 09/15] vpc: Round up image size during fixed image creation, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 11/15] qcow2: Keep unknown header extension when rewriting header, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 12/15] rewrite QEMU_BUILD_BUG_ON, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 10/15] qcow2: Update whole header at once, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 08/15] vpc: Add support for Fixed Disk type, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 13/15] AHCI: Fix port reset race, Kevin Wolf, 2012/02/10
- [Qemu-devel] [PATCH 07/15] iSCSI: add configuration variables for iSCSI, Kevin Wolf, 2012/02/10
- Re: [Qemu-devel] [PULL 00/15] Block patches, Kevin Wolf, 2012/02/15
- Re: [Qemu-devel] [PULL 00/15] Block patches, Anthony Liguori, 2012/02/15