qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul
@ 2011-08-03  8:49 Paolo Bonzini
  2011-08-03  8:49 ` [Qemu-devel] [PATCH 01/16] scsi-disk: no need to call scsi_req_data on a short read Paolo Bonzini
                   ` (16 more replies)
  0 siblings, 17 replies; 29+ messages in thread
From: Paolo Bonzini @ 2011-08-03  8:49 UTC (permalink / raw)
  To: qemu-devel

This is a pretty important step in the modernization and improvement
of the SCSI backends, and a prerequisite for pretty much everything
that is on the table: migration, addressing, improved CD-ROM support,
hotplug.

The series touches two main parts:

1) sense data.  Autosense is made a first-class citizen of the
subsystem.  Sense data is communicated to the target primarily
via autosense, and it is then the target that uses this information
to reply to REQUEST SENSE commands.  In addition, each LUN or
target can be in a unit attention condition, which will be
communicated via either autosense or REQUEST SENSE, or cleared
automatically.

2) target requests.  The common example of this is REPORT LUNS
and commands sent to invalid LUNs.  Handling of these commands
previously had to be done for every SCSIDevice.  This series splits
request-related SCSIDevice callbacks out into a new SCSIReqOps
structure, thus allowing the target (SCSIBus) to hijack those requests
and reply to them without involving the SCSIDevice at all.  The
system is quite flexible, and is also used for invalid commands,
REQUEST SENSE and commands sent while a unit attention
condition is pending.

Finally, other parts of the SCSIDevice code are moved to common
code including general parsing of requests.

The two parts are slightly intertwined.  Sense data is handled by patches
2/3/4/12/13/14/15, and target requests are handled by patches 5 to 11.
(patches 1 and 16 are somewhat unrelated).  The reason for this is that
the current device-specific handling of sense data conflicts heavily
with the goal of handling some commands in a device-independent way.
So, the series starts by moving sense handling to generic code, and
comes back to generic handling of REQUEST SENSE and unit attention after
implementing a few others device-independent requests.

It conflicts somewhat with Markus's tray series, but not in a
fatal way; the conflicts are trivial.

Paolo Bonzini (16):
  scsi-disk: no need to call scsi_req_data on a short read
  vscsi: always use get_sense
  scsi: pass status when completing
  scsi: move sense handling to generic code
  scsi: introduce SCSIReqOps
  scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps
  scsi: pass cdb already to scsi_req_new
  scsi: introduce SCSICommand
  scsi: push lun field to SCSIDevice
  scsi: move request parsing to common code
  scsi: move handling of REPORT LUNS and invalid LUNs to common code
  scsi: move handling of REQUEST SENSE to common code
  scsi: add a bunch more common sense codes
  scsi: add support for unit attention conditions
  scsi: report unit attention on reset
  scsi: add special traces for common commands

 hw/esp.c          |    4 +-
 hw/lsi53c895a.c   |    4 +-
 hw/scsi-bus.c     |  578 +++++++++++++++++++++++++++++++++++++++++++++--------
 hw/scsi-defs.h    |    4 +
 hw/scsi-disk.c    |  164 +++++-----------
 hw/scsi-generic.c |  156 ++++-----------
 hw/scsi.h         |   72 +++++--
 hw/spapr_vscsi.c  |   95 ++-------
 hw/usb-msd.c      |    4 +-
 trace-events      |    5 +
 10 files changed, 668 insertions(+), 418 deletions(-)

-- 
1.7.6

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2011-08-12 17:11 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03  8:49 [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 01/16] scsi-disk: no need to call scsi_req_data on a short read Paolo Bonzini
2011-08-03 16:32   ` Christoph Hellwig
2011-08-04 13:35   ` Stefan Hajnoczi
2011-08-04 13:46     ` Kevin Wolf
2011-08-03  8:49 ` [Qemu-devel] [PATCH 02/16] vscsi: always use get_sense Paolo Bonzini
2011-08-03 16:32   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 03/16] scsi: pass status when completing Paolo Bonzini
2011-08-03 16:34   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 04/16] scsi: move sense handling to generic code Paolo Bonzini
2011-08-03 16:34   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 05/16] scsi: introduce SCSIReqOps Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 06/16] scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 07/16] scsi: pass cdb already to scsi_req_new Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 08/16] scsi: introduce SCSICommand Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 09/16] scsi: push lun field to SCSIDevice Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 10/16] scsi: move request parsing to common code Paolo Bonzini
2011-08-12 16:12   ` Peter Maydell
2011-08-12 17:05     ` Paolo Bonzini
2011-08-12 16:55   ` Peter Maydell
2011-08-12 17:11     ` Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 11/16] scsi: move handling of REPORT LUNS and invalid LUNs " Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 12/16] scsi: move handling of REQUEST SENSE " Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 13/16] scsi: add a bunch more common sense codes Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 14/16] scsi: add support for unit attention conditions Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 15/16] scsi: report unit attention on reset Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 16/16] scsi: add special traces for common commands Paolo Bonzini
2011-08-12 13:49 ` [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul Anthony Liguori
2011-08-12 15:48   ` Paolo Bonzini

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).