Commit 4407c1c5 authored by Fam Zheng's avatar Fam Zheng Committed by Kevin Wolf
Browse files

virtio-blk: Schedule BH in the right context



The BH must be called in the AioContext of bs. Currently it is only the
main loop, but with coming changes, it could also be a dataplane
IOThread.

Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Tested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent fee65db7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -469,7 +469,8 @@ static void virtio_blk_dma_restart_cb(void *opaque, int running,
    }

    if (!s->bh) {
        s->bh = qemu_bh_new(virtio_blk_dma_restart_bh, s);
        s->bh = aio_bh_new(bdrv_get_aio_context(s->blk.conf.bs),
                           virtio_blk_dma_restart_bh, s);
        qemu_bh_schedule(s->bh);
    }
}