aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/scsi-generic.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-09-25 10:20:47 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-30 13:30:51 +0200
commitd5776465ee9a55815792efa34d79de240f4ffd99 (patch)
tree24a4cd8b2d744c144dba6f7dfccf170044b10a75 /hw/scsi/scsi-generic.c
parenta83cfd12d9868b6732e3c6e5b2cbd69a2e0ab689 (diff)
scsi: Introduce scsi_req_cancel_complete
Let the aio cb do the clean up and notification job after scsi_req_cancel, in preparation for asynchronous cancellation. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-generic.c')
-rw-r--r--hw/scsi/scsi-generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 7e85047d7c..01bca084e6 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -94,6 +94,7 @@ static void scsi_command_complete(void *opaque, int ret)
r->req.aiocb = NULL;
if (r->req.io_canceled) {
+ scsi_req_cancel_complete(&r->req);
goto done;
}
if (r->io_header.driver_status & SG_ERR_DRIVER_SENSE) {