Some emulated disk operations (MODE SELECT, UNMAP, WRITE SAME) can trigger asynchronous I/Os. Provide the cancel_io callback to ensure that AIOCBs are properly cleaned up.
Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> Cc: qemu-sta...@nongnu.org [Tweak commit message. - Paolo] Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/scsi/scsi-disk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index bce617c..ee1f5eb 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2306,6 +2306,7 @@ static const SCSIReqOps scsi_disk_emulate_reqops = { .send_command = scsi_disk_emulate_command, .read_data = scsi_disk_emulate_read_data, .write_data = scsi_disk_emulate_write_data, + .cancel_io = scsi_cancel_io, .get_buf = scsi_get_buf, }; -- 1.8.3.1