summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-02-25 12:12:58 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-03-05 17:51:51 +0100
commit6f6710aa99ac53b59ff0f14380830cb9ab6bdc14 (patch)
treef28300e58f3cb5d185887d1ded9bf72200299257 /hw
parent3c33ea9640758bb625e110a77673e5abfd184e54 (diff)
downloadqemu-6f6710aa99ac53b59ff0f14380830cb9ab6bdc14.zip
scsi: do not call scsi_read_data/scsi_write_data for a canceled request
Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-bus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index a97f1cdc1c..01e1dec4ca 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -1508,6 +1508,10 @@ void scsi_req_unref(SCSIRequest *req)
will start the next chunk or complete the command. */
void scsi_req_continue(SCSIRequest *req)
{
+ if (req->io_canceled) {
+ trace_scsi_req_continue_canceled(req->dev->id, req->lun, req->tag);
+ return;
+ }
trace_scsi_req_continue(req->dev->id, req->lun, req->tag);
if (req->cmd.mode == SCSI_XFER_TO_DEV) {
req->ops->write_data(req);