]> git.proxmox.com Git - mirror_qemu.git/commitdiff
scsi-disk: do not complete requests early for rerror/werror=ignore
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Feb 2021 12:16:32 +0000 (13:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Feb 2021 13:14:32 +0000 (14:14 +0100)
When requested to ignore errors, just do nothing and let the
request complete normally.  This means that the request will
be accounted correctly.

This is what commit 40dce4ee61 ("scsi-disk: fix rerror/werror=ignore",
2018-10-19) was supposed to do:

Fixes: 40dce4ee61 ("scsi-disk: fix rerror/werror=ignore", 2018-10-19)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c

index 18ab777017c7b76881737074c04548519313af3d..36aa8724454905ae6538dd220d2176c2b7471cc5 100644 (file)
@@ -253,8 +253,7 @@ 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;
+        return false;
     }
 
     if (action == BLOCK_ERROR_ACTION_STOP) {