scsi: Assign cancel_io vector for scsi_disk_emulate_ops

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 <farman@linux.vnet.ibm.com>
Cc: qemu-stable@nongnu.org
[Tweak commit message. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2014-01-15 10:35:36 +01:00
parent 1cf892ca26
commit 33325a53f1
1 changed files with 1 additions and 0 deletions

View File

@ -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,
};