提交 47a150a4 编写于 作者: P Paolo Bonzini 提交者: Anthony Liguori

virtio-scsi: abort in-flight I/O when the device is reset

When the device is reset, the SCSI bus should also be reset so
that in-flight I/O is cancelled.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 d0508c36
......@@ -565,6 +565,10 @@ static void virtio_scsi_reset(VirtIODevice *vdev)
{
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
s->resetting++;
qbus_reset_all(&s->bus.qbus);
s->resetting--;
s->sense_size = VIRTIO_SCSI_SENSE_SIZE;
s->cdb_size = VIRTIO_SCSI_CDB_SIZE;
s->events_dropped = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册