qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul
Date: Fri, 12 Aug 2011 08:49:09 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

On 08/03/2011 03:49 AM, Paolo Bonzini wrote:
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.

Applied all.  Thanks.

It fuzzed a bit, it seems pretty trivial to me but wouldn't hurt to double check. I tested SCSI quite a bit afterwards too.

Regards,

Anthony Liguori


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]