qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Alistair Francis <alistair23@gmail.com>
Cc: "fam@euphon.net" <fam@euphon.net>,
	Alistair Francis <Alistair.Francis@wdc.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v1 1/1] hw/scsi: Report errors and sense to guests through scsi-block
Date: Mon, 1 Jul 2019 13:56:32 +0200	[thread overview]
Message-ID: <79c9e21f-06b1-6255-97af-95c08b354c8a@redhat.com> (raw)
In-Reply-To: <CY1PR04MB22682B84C1ABA7FB10752465EDF90@CY1PR04MB2268.namprd04.prod.outlook.com>

On 01/07/19 12:14, Shinichiro Kawasaki wrote:
> I observe four of them listed below in sense data, 
> when I ran basic operations to the zoned storage from the guest via scsi-block.
> 
>      21h 04h: UNALIGNED WRITE COMMAND
>      21h 05h: WRITE BOUNDARY VIOLATION
>      21h 06h: ATTEMPT TO READ INVALID DATA
>      55h 0Eh: INSUFFICIENT ZONE RESOURCES
> 
> These ASCs can be reported for write or read commands due to unexpected zone
> status or write pointer status. Reporting these ASCs to the guest, the user
> applications can handle them to manage zone/write pointer status, or help the
> user application developers to understand the failure reason and fix bugs.
> 
> I took a look in scsi_sense_to_errno() and learned that ASCs are grouped in 
> errnos. To report the ASCs above to the guest, is it good to add them in EINVAL 
> group defined in scsi_sense_to_errno()? The ASCs are reported with sense key 
> ILLEGAL_REQUEST or DATA_PROTECT, then I think it fits in the function.

The grouping by errno is historical and pretty much broken.  It should
be possible to change it to return just a bool.

Paolo


  reply	other threads:[~2019-07-01 11:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 22:46 [Qemu-devel] [PATCH v1 1/1] hw/scsi: Report errors and sense to guests through scsi-block Alistair Francis
2019-06-27  9:01 ` Paolo Bonzini
2019-06-28 21:57   ` Alistair Francis
2019-06-28 22:14     ` Paolo Bonzini
2019-06-28 22:18       ` Alistair Francis
2019-07-01 10:14         ` Shinichiro Kawasaki
2019-07-01 11:56           ` Paolo Bonzini [this message]
2019-07-02  6:44             ` Shinichiro Kawasaki
2019-07-02 10:22               ` Paolo Bonzini
2019-07-05 10:31                 ` Shinichiro Kawasaki
2019-07-05 17:08                   ` Paolo Bonzini
2019-07-09  8:27                     ` Shinichiro Kawasaki

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=79c9e21f-06b1-6255-97af-95c08b354c8a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=fam@euphon.net \
    --cc=qemu-devel@nongnu.org \
    --cc=shinichiro.kawasaki@wdc.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).