qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] scsi-block: Add qdev error properties
Date: Thu, 17 Aug 2017 14:20:25 +0200	[thread overview]
Message-ID: <a4902208-fca3-519a-76d9-3074aa802ef6@redhat.com> (raw)
In-Reply-To: <20170817120348.GE616@lemon>

On 17/08/2017 14:03, Fam Zheng wrote:
> On Thu, 08/17 13:44, Paolo Bonzini wrote:
>> On 17/08/2017 12:28, Fam Zheng wrote:
>>> This makes the werror/rerror options available on the scsi-block device,
>>> to allow user specify error handling policy in the same way as scsi-hd
>>> etc.
>>>
>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>
>> I'm not sure this is enough, because you would only obey the
>> rerror/werror action if ioctl fails, not if the ioctl succeeds but the
>> command fails (the "r->status && *r->status" conditional in
>> scsi_disk_req_check_error).
> 
> Yes, I missed that.  Why isn't scsi_handle_rw_error called in that if block
> currently?

A recursive answer is because scsi-block doesn't have rerror and werror
(and it's the only one that sets r->status, see scsi_block_dma_command).

More precisely, scsi_handle_rw_error more or less assumes error != 0
(see the switch statement and blk_error_action), so some other changes
are needed to cover that case---at least not overwrite the sense and
ensure something sensible comes out of the QMP event.

Paolo

      reply	other threads:[~2017-08-17 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17 10:28 [Qemu-devel] [PATCH] scsi-block: Add qdev error properties Fam Zheng
2017-08-17 11:44 ` Paolo Bonzini
2017-08-17 12:03   ` Fam Zheng
2017-08-17 12:20     ` 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=a4902208-fca3-519a-76d9-3074aa802ef6@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).