[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/11] sheepdog: Use bdrv_coroutine_enter before BDRV
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PULL 11/11] sheepdog: Use bdrv_coroutine_enter before BDRV_POLL_WHILE |
Date: |
Tue, 11 Apr 2017 20:26:32 +0800 |
When called from main thread, the coroutine should run in the context of
bs. Use bdrv_coroutine_enter to ensure that.
Signed-off-by: Fam Zheng <address@hidden>
---
block/sheepdog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 1b71fc8..14d6327 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -736,7 +736,7 @@ static int do_req(int sockfd, BlockDriverState *bs,
SheepdogReq *hdr,
} else {
co = qemu_coroutine_create(do_co_req, &srco);
if (bs) {
- qemu_coroutine_enter(co);
+ bdrv_coroutine_enter(bs, co);
BDRV_POLL_WHILE(bs, !srco.finished);
} else {
qemu_coroutine_enter(co);
--
2.9.3
- [Qemu-devel] [PULL 00/11] Block patches for 2.9-rc4, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 01/11] block: Make bdrv_parent_drained_begin/end public, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 02/11] block: Quiesce old aio context during bdrv_set_aio_context, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 03/11] tests/block-job-txn: Don't start block job before adding to txn, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 04/11] coroutine: Extract qemu_aio_coroutine_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 05/11] async: Introduce aio_co_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 06/11] block: Introduce bdrv_coroutine_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 07/11] blockjob: Use bdrv_coroutine_enter to start coroutine, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 08/11] qemu-io-cmds: Use bdrv_coroutine_enter, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 09/11] block: Use bdrv_coroutine_enter to start I/O coroutines, Fam Zheng, 2017/04/11
- [Qemu-devel] [PULL 11/11] sheepdog: Use bdrv_coroutine_enter before BDRV_POLL_WHILE,
Fam Zheng <=
- [Qemu-devel] [PULL 10/11] block: Fix bdrv_co_flush early return, Fam Zheng, 2017/04/11
- Re: [Qemu-devel] [PULL 00/11] Block patches for 2.9-rc4, Peter Maydell, 2017/04/11