On 21.05.2015 08:42, Fam Zheng wrote:
virtio-blk now listens to op blocker change of the associated block
backend.
Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO:
non-dataplane:
1) Set VirtIOBlock.paused
2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused
dataplane:
1) Clear the host event notifier
2) In handle_notify, do nothing if VirtIOBlock.paused
Up on removing the op blocker:
non-dataplane:
1) Clear VirtIOBlock.paused
2) Schedule a BH on the AioContext of the backend, which calls
virtio_blk_handle_output, so that the previous unhandled kicks can
make progress
dataplane:
1) Set the host event notifier
2) Notify the host event notifier so that unhandled events are
processed
Signed-off-by: Fam Zheng <f...@redhat.com>
---
hw/block/dataplane/virtio-blk.c | 25 ++++++++++++++++-
hw/block/virtio-blk.c | 59 +++++++++++++++++++++++++++++++++++++++--
include/hw/virtio/virtio-blk.h | 8 +++++-
3 files changed, 88 insertions(+), 4 deletions(-)
(this is what happens if you sort your inbox from oldest to newest and
go from top to bottom)
Reviewed-by: Max Reitz <mre...@redhat.com>