projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49ca625
)
sheepdog: Use bdrv_coroutine_enter before BDRV_POLL_WHILE
author
Fam Zheng
<famz@redhat.com>
Tue, 11 Apr 2017 11:43:52 +0000
(19:43 +0800)
committer
Fam Zheng
<famz@redhat.com>
Tue, 11 Apr 2017 12:07:15 +0000
(20:07 +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 <famz@redhat.com>
block/sheepdog.c
patch
|
blob
|
history
diff --git
a/block/sheepdog.c
b/block/sheepdog.c
index 1b71fc81ec4d4e9df6de0ec738a9ef2efc11921e..14d63272093524dc224a22507a5620db508dfbdb 100644
(file)
--- 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);