diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-24 13:16:32 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-25 14:14:32 +0100 |
commit | 424740def9a42da88550410de9a41ef07cc4a010 (patch) | |
tree | c147f77094f627e0743fa5f3a17301c5fe6d630f | |
parent | f95f61c2c9618fae7d8ea4c1d63e7416884bad52 (diff) |
scsi-disk: do not complete requests early for rerror/werror=ignore
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>
-rw-r--r-- | hw/scsi/scsi-disk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 18ab777017..36aa872445 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -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) { |