]> git.proxmox.com Git - mirror_qemu.git/commit
virtio-blk: Increase in_flight for request restart BH
authorKevin Wolf <kwolf@redhat.com>
Thu, 14 Feb 2019 17:51:03 +0000 (18:51 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 25 Feb 2019 14:03:19 +0000 (15:03 +0100)
commit680f200217748e0920b79ec1d524717c2f50935b
treece5268b35f4b9878908c78c5e4e5f1a950b99813
parentc90e2a9cfd94bd02d92c53b97f04fd595001de7e
virtio-blk: Increase in_flight for request restart BH

virtio_blk_dma_restart_bh() submits new requests, so in order to make
sure that these requests are not started inside a drained section of the
attached BlockBackend, we need to make sure that draining the
BlockBackend waits for the BH to be executed.

This BH is still questionable because its scheduled in the main thread
instead of the configured iothread. Leave a FIXME comment for this.

But with this fix, enabling the data plane at least waits for these
requests (in bdrv_set_aio_context()) instead of changing the AioContext
under their feet and making them run in the wrong thread, causing
crashes and failures (e.g. due to missing locking).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/virtio-blk.c