summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorFam Zheng2017-04-11 13:43:52 +0200
committerFam Zheng2017-04-11 14:07:15 +0200
commit76296dff97864ebb15fa65cc56a6f890ee0c5a28 (patch)
treeec6ce58ff71332901a8ab5957c5221c66440a9ac /block
parentblock: Fix bdrv_co_flush early return (diff)
downloadqemu-76296dff97864ebb15fa65cc56a6f890ee0c5a28.tar.gz
qemu-76296dff97864ebb15fa65cc56a6f890ee0c5a28.tar.xz
qemu-76296dff97864ebb15fa65cc56a6f890ee0c5a28.zip
sheepdog: Use bdrv_coroutine_enter before BDRV_POLL_WHILE
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 <famz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/sheepdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 1b71fc81ec..14d6327209 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);