aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-04-11 19:43:52 +0800
committerFam Zheng <famz@redhat.com>2017-04-11 20:07:15 +0800
commit76296dff97864ebb15fa65cc56a6f890ee0c5a28 (patch)
treeec6ce58ff71332901a8ab5957c5221c66440a9ac /block
parent49ca6259131c6b0555845fcac3e34467c8ac37eb (diff)
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);