[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 06/13] virtio-scsi-dataplane: Add "device IO"

From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v5 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener
Date: Sat, 23 May 2015 18:13:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 20.05.2015 08:16, Fam Zheng wrote:
When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care
of protecting the block device with op blockers. Currently we haven't
enabled block jobs (like what's done in virtio_blk_data_plane_create),
but it is necessary to honor "device IO" op blocker first before we do.
This is useful to make sure that guest IO requests are paused during qmp
transactions (such as multi-disk snapshot or backup).

A counter is added to the virtio-scsi device, which keeps track of
currently blocked disks. If it goes from 0 to 1, the ioeventfds are
disabled; when it goes back to 0, they are re-enabled.

Also in device initialization, push the enabling of ioeventfds to before
return, so the virtio_scsi_clear_aio is not needed there. Rename it,
pair with an enabling variant, fix one coding style issue, then use it
in the device pause points.

Signed-off-by: Fam Zheng <address@hidden>
  hw/scsi/virtio-scsi-dataplane.c | 82 +++++++++++++++++++++++++++++++----------
  hw/scsi/virtio-scsi.c           |  3 ++
  include/hw/virtio/virtio-scsi.h |  3 ++
  3 files changed, 68 insertions(+), 20 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]