[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 35/53] iscsi: return -EIO when sense fields are meaningless
From: |
Paolo Bonzini |
Subject: |
[PULL 35/53] iscsi: return -EIO when sense fields are meaningless |
Date: |
Mon, 6 Jul 2020 12:41:37 -0400 |
From: Xie Yongji <xieyongji@bytedance.com>
When an I/O request failed, now we only return correct
value on scsi check condition. We should also have a
default errno such as -EIO in other case.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Message-Id: <20200701105444.3226-2-xieyongji@bytedance.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/iscsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index 2964c9f8d2..387ed872ef 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -241,9 +241,11 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int
status,
iTask->status = status;
iTask->do_retry = 0;
+ iTask->err_code = 0;
iTask->task = task;
if (status != SCSI_STATUS_GOOD) {
+ iTask->err_code = -EIO;
if (iTask->retries++ < ISCSI_CMD_RETRIES) {
if (status == SCSI_STATUS_BUSY ||
status == SCSI_STATUS_TIMEOUT ||
--
2.26.2
- Re: [PULL 31/53] KVM: x86: believe what KVM says about WAITPKG, (continued)
- [PULL 13/53] i386: hvf: Move synchronize functions to sysemu, Paolo Bonzini, 2020/07/06
- [PULL 15/53] i386: hvf: Make long mode enter and exit clearer, Paolo Bonzini, 2020/07/06
- [PULL 30/53] target/i386: implement undocumented "smsw r32" behavior, Paolo Bonzini, 2020/07/06
- [PULL 20/53] MAINTAINERS: Fix KVM path expansion glob, Paolo Bonzini, 2020/07/06
- [PULL 32/53] target/i386: sev: provide proper error reporting for query-sev-capabilities, Paolo Bonzini, 2020/07/06
- [PULL 26/53] accel/Kconfig: Add the TCG selector, Paolo Bonzini, 2020/07/06
- [PULL 40/53] pc: fix leak in pc_system_flash_cleanup_unused, Paolo Bonzini, 2020/07/06
- [PULL 29/53] target/i386: remove gen_io_end, Paolo Bonzini, 2020/07/06
- [PULL 33/53] target/i386: sev: fail query-sev-capabilities if QEMU cannot use SEV, Paolo Bonzini, 2020/07/06
- [PULL 35/53] iscsi: return -EIO when sense fields are meaningless,
Paolo Bonzini <=
- [PULL 37/53] checkpatch: Change occurences of 'kernel' to 'qemu' in user messages, Paolo Bonzini, 2020/07/06
- [PULL 38/53] target/i386: Correct the warning message of Intel PT, Paolo Bonzini, 2020/07/06
- [PULL 41/53] softmmu: move softmmu only files from root, Paolo Bonzini, 2020/07/06
- [PULL 27/53] accel/tcg: Add stub for probe_access(), Paolo Bonzini, 2020/07/06
- [PULL 49/53] target/i386/kvm: Simplify kvm_get_mce_cap_supported(), Paolo Bonzini, 2020/07/06
- [PULL 53/53] scripts: improve message when TAP based tests fail, Paolo Bonzini, 2020/07/06
- [PULL 46/53] accel/kvm: Simplify kvm_check_extension(), Paolo Bonzini, 2020/07/06
- [PULL 47/53] accel/kvm: Simplify kvm_check_extension_list(), Paolo Bonzini, 2020/07/06
- [PULL 45/53] accel/kvm: Let kvm_check_extension use global KVM state, Paolo Bonzini, 2020/07/06
- [PULL 28/53] Makefile: simplify MINIKCONF rules, Paolo Bonzini, 2020/07/06