[PATCH 00/11] scsi-generic: error handling overhaul

Paolo Bonzini posted 11 patches 3 years, 2 months ago
Only 10 patches received!
hw/scsi/esp-pci.c        |   5 +-
hw/scsi/esp.c            |   7 +-
hw/scsi/lsi53c895a.c     |   6 +-
hw/scsi/megasas.c        |   6 +-
hw/scsi/mptsas.c         |   5 +-
hw/scsi/scsi-bus.c       |  23 ++++-
hw/scsi/scsi-disk.c      | 203 ++++++++++++++++++++++-----------------
hw/scsi/scsi-generic.c   |  20 ++--
hw/scsi/spapr_vscsi.c    |  10 +-
hw/scsi/virtio-scsi.c    |  51 +++++++++-
hw/scsi/vmw_pvscsi.c     |  43 ++++++++-
hw/usb/dev-storage.c     |   6 +-
hw/usb/dev-uas.c         |   7 +-
include/hw/scsi/esp.h    |   2 +-
include/hw/scsi/scsi.h   |   6 +-
include/scsi/constants.h |   3 +
include/scsi/utils.h     |  29 ++++--
scsi/qemu-pr-helper.c    |  24 +++--
scsi/utils.c             | 119 +++++++++++++++++------
19 files changed, 395 insertions(+), 180 deletions(-)
[PATCH 00/11] scsi-generic: error handling overhaul
Posted by Paolo Bonzini 3 years, 2 months ago
This series is mostly a refresh of Hannes's patches at
https://patchew.org/QEMU/20201116184041.60465-1-hare@suse.de/, which
haven't been applied yet because they broke the testsuite.

In addition to Hannes's introduction of host status in the SCSI
subsystem, which survives mostly in patches 3 and 6-10, I am also changing
scsi_handle_rw_error to always pass down guest-recoverable sense codes,
even if rerror=stop/werror=stop.  Without this change, [rw]error=stop are
mostly unusable because the guest will stop even for unit attention sense.

Paolo

Supersedes: <20201116184041.60465-1-hare@suse.de>

Hannes Reinecke (5):
  scsi: drop 'result' argument from command_complete callback
  scsi: Rename linux-specific SG_ERR codes to generic SCSI_HOST error
    codes
  scsi: Add mapping for generic SCSI_HOST status to sense codes
  scsi: inline sg_io_sense_from_errno() into the callers.
  scsi: move host_status handling into SCSI drivers

Paolo Bonzini (5):
  scsi-disk: move scsi_handle_rw_error earlier
  scsi-disk: do not complete requests early for rerror/werror=ignore
  scsi: introduce scsi_sense_from_errno()
  scsi-disk: pass SCSI status to scsi_handle_rw_error
  scsi-disk: pass guest recoverable errors through even for rerror=stop

 hw/scsi/esp-pci.c        |   5 +-
 hw/scsi/esp.c            |   7 +-
 hw/scsi/lsi53c895a.c     |   6 +-
 hw/scsi/megasas.c        |   6 +-
 hw/scsi/mptsas.c         |   5 +-
 hw/scsi/scsi-bus.c       |  23 ++++-
 hw/scsi/scsi-disk.c      | 203 ++++++++++++++++++++++-----------------
 hw/scsi/scsi-generic.c   |  20 ++--
 hw/scsi/spapr_vscsi.c    |  10 +-
 hw/scsi/virtio-scsi.c    |  51 +++++++++-
 hw/scsi/vmw_pvscsi.c     |  43 ++++++++-
 hw/usb/dev-storage.c     |   6 +-
 hw/usb/dev-uas.c         |   7 +-
 include/hw/scsi/esp.h    |   2 +-
 include/hw/scsi/scsi.h   |   6 +-
 include/scsi/constants.h |   3 +
 include/scsi/utils.h     |  29 ++++--
 scsi/qemu-pr-helper.c    |  24 +++--
 scsi/utils.c             | 119 +++++++++++++++++------
 19 files changed, 395 insertions(+), 180 deletions(-)

-- 
2.29.2


Re: [PATCH 00/11] scsi-generic: error handling overhaul
Posted by Philippe Mathieu-Daudé 3 years, 2 months ago
On 2/24/21 7:24 PM, Paolo Bonzini wrote:
> This series is mostly a refresh of Hannes's patches at
> https://patchew.org/QEMU/20201116184041.60465-1-hare@suse.de/, which
> haven't been applied yet because they broke the testsuite.
> 
> In addition to Hannes's introduction of host status in the SCSI
> subsystem, which survives mostly in patches 3 and 6-10, I am also changing
> scsi_handle_rw_error to always pass down guest-recoverable sense codes,
> even if rerror=stop/werror=stop.  Without this change, [rw]error=stop are
> mostly unusable because the guest will stop even for unit attention sense.
> 
> Paolo
> 
> Supersedes: <20201116184041.60465-1-hare@suse.de>
> 
> Hannes Reinecke (5):
>   scsi: drop 'result' argument from command_complete callback
>   scsi: Rename linux-specific SG_ERR codes to generic SCSI_HOST error
>     codes
>   scsi: Add mapping for generic SCSI_HOST status to sense codes
>   scsi: inline sg_io_sense_from_errno() into the callers.
>   scsi: move host_status handling into SCSI drivers
> 
> Paolo Bonzini (5):
>   scsi-disk: move scsi_handle_rw_error earlier
>   scsi-disk: do not complete requests early for rerror/werror=ignore
>   scsi: introduce scsi_sense_from_errno()
>   scsi-disk: pass SCSI status to scsi_handle_rw_error
>   scsi-disk: pass guest recoverable errors through even for rerror=stop

$ b4 am 20210224182453.587731-1-pbonzini@redhat.com
Grabbing thread from lore.kernel.org/qemu-devel
Analyzing 11 messages in the thread
---
  ERROR: missing [11/11]!
---
Total patches: 10
---
WARNING: Thread incomplete!

I suppose this is OK ;)

patchew is stuck too:
Only 10 patches received!
https://patchew.org/QEMU/20210224182453.587731-1-pbonzini@redhat.com/