Commit 76296dff authored by Fam Zheng's avatar Fam Zheng
Browse files

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: default avatarFam Zheng <famz@redhat.com>
parent 49ca6259
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);