qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Zihao Chang <changzihao1@huawei.com>, Fam Zheng <fam@euphon.net>,
	pbonzini@redhat.com
Cc: Kevin Wolf <kwolf@redhat.com>, Qemu-block <qemu-block@nongnu.org>,
	qemu-devel@nongnu.org, xiexiangyou@huawei.com,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] scsi: allow user to set werror as report
Date: Thu, 3 Dec 2020 10:53:23 +0100	[thread overview]
Message-ID: <37acb898-8d6d-725b-6b48-f6d4a2cfa9fd@redhat.com> (raw)
In-Reply-To: <2130de2b-d1cd-cfb9-51ee-a775e253d4a6@huawei.com>

On 12/3/20 3:55 AM, Zihao Chang wrote:
> Ping? This is a fix patch which has been reviewed, whose tree should it go via?

The change itself is in-between 'Block layer' and 'SCSI'
subsystems, so either Paolo or Kevin (Cc'ing qemu-block@).

> 
> Thanks
> Zihao
> 
> On 2020/11/3 22:03, Zihao Chang wrote:
>>
>>
>> On 2020/11/3 18:52, Fam Zheng wrote:
>>> On Tue, 2020-11-03 at 14:12 +0800, Zihao Chang wrote:
>>>> 'enospc' is the default for -drive, but qemu allows user to set
>>>> drive option werror. If werror of scsi-generic is set to 'report'
>>>> by user, qemu will not allow vm to start.
>>>>
>>>> This patch allow user to set werror as 'report' for scsi-generic.
>>>>
>>>> Signed-off-by: Zihao Chang <changzihao1@huawei.com>
>>>> ---
>>>>  hw/scsi/scsi-generic.c | 3 ++-
>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
>>>> index 2cb23ca891..2730e37d63 100644
>>>> --- a/hw/scsi/scsi-generic.c
>>>> +++ b/hw/scsi/scsi-generic.c
>>>> @@ -664,7 +664,8 @@ static void scsi_generic_realize(SCSIDevice *s,
>>>> Error **errp)
>>>>          return;
>>>>      }
>>>>  
>>>> -    if (blk_get_on_error(s->conf.blk, 0) !=
>>>> BLOCKDEV_ON_ERROR_ENOSPC) {
>>>> +    if (blk_get_on_error(s->conf.blk, 0) != BLOCKDEV_ON_ERROR_ENOSPC
>>>> &&
>>>> +        blk_get_on_error(s->conf.blk, 0) !=
>>>> BLOCKDEV_ON_ERROR_REPORT) {
>>>>          error_setg(errp, "Device doesn't support drive option
>>>> werror");
>>>>          return;
>>>>      }
>>>
>>> Accepting the report sounds sane to me, it matches what we actually
>>> (always) do. Is the idea to allow users to spell it out explicitly in
>>> the command line?
>>>
>> Actually, qemu supports user to spell it out explicitly in the command
>> line like "enospc", "report" & "action". This patch just allows user to
>> set werror as "report" for scsi-generic, which is a common scenario.
>>
>>> Reviewed-by: Fam Zheng <fam@euphon.net>
>>>
>>> .
>>>
> 



  reply	other threads:[~2020-12-03  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  6:12 [PATCH] scsi: allow user to set werror as report Zihao Chang
2020-11-03 10:52 ` Fam Zheng
2020-11-03 14:03   ` Zihao Chang
2020-12-03  2:55     ` Zihao Chang
2020-12-03  9:53       ` Philippe Mathieu-Daudé [this message]
2021-01-12  2:39         ` Zihao Chang
2021-01-13 12:55       ` Paolo Bonzini

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=37acb898-8d6d-725b-6b48-f6d4a2cfa9fd@redhat.com \
    --to=philmd@redhat.com \
    --cc=changzihao1@huawei.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xiexiangyou@huawei.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).