mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
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: Fam Zheng <famz@redhat.com> Tested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
fee65db771
commit
4407c1c56a
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue