qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>,
	kwolf@redhat.com, mreitz@redhat.com
Cc: elohimes@gmail.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 2/2] iscsi: return -EIO when sense fields are meaningless
Date: Wed, 1 Jul 2020 13:40:57 +0200	[thread overview]
Message-ID: <8b9eaebc-0897-5348-79ef-a877e3300bd3@redhat.com> (raw)
In-Reply-To: <20200701105444.3226-2-xieyongji@bytedance.com>

On 01/07/20 12:54, Xie Yongji wrote:
> 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>
> ---
>  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 ||
> 

Queued both, thanks.

Paolo



      reply	other threads:[~2020-07-01 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 10:54 [PATCH 1/2] iscsi: handle check condition status in retry loop Xie Yongji
2020-07-01 10:54 ` [PATCH 2/2] iscsi: return -EIO when sense fields are meaningless Xie Yongji
2020-07-01 11:40   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b9eaebc-0897-5348-79ef-a877e3300bd3@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=elohimes@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xieyongji@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).