aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-10-13 11:52:34 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-19 13:44:13 +0200
commit40dce4ee61c68395f6d463fae792f61b7c003bce (patch)
tree5bd097c3a5a34be2f0dfc5f21e2e4cd9014fed6d /hw/scsi
parente6aa5ba4ac423dd282c831402110970ee278392e (diff)
downloadqemu-40dce4ee61c68395f6d463fae792f61b7c003bce.zip
qemu-40dce4ee61c68395f6d463fae792f61b7c003bce.tar.gz
qemu-40dce4ee61c68395f6d463fae792f61b7c003bce.tar.bz2
scsi-disk: fix rerror/werror=ignore
rerror=ignore was returning true from scsi_handle_rw_error but the callers were not calling scsi_req_complete when rerror=ignore returns true (this is the correct thing to do when true is returned after executing a passthrough command). Fix this by calling it in scsi_handle_rw_error. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/scsi-disk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 4074d7c..e2c5408 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -473,10 +473,15 @@ static bool scsi_handle_rw_error(SCSIDiskReq *r, int error, bool acct_failed)
}
blk_error_action(s->qdev.conf.blk, action, is_read, error);
+ if (action == BLOCK_ERROR_ACTION_IGNORE) {
+ scsi_req_complete(&r->req, 0);
+ return true;
+ }
+
if (action == BLOCK_ERROR_ACTION_STOP) {
scsi_req_retry(&r->req);
}
- return action != BLOCK_ERROR_ACTION_IGNORE;
+ return false;
}
static void scsi_write_complete_noio(SCSIDiskReq *r, int ret)