From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH 0/6] SCSI series part 2, rewrite LUN parsing
Date: Fri, 20 May 2011 17:03:31 +0200 [thread overview]
Message-ID: <1305903817-25476-1-git-send-email-pbonzini@redhat.com> (raw)
This is the second part of my SCSI work. The first is still pending
and this one is incomplete, but I still would like to get opinions
early enough because this design directly affects the UI.
This series is half of the work that is necessary to support multiple
LUNs behind a target. The idea is to have two devices, "scsi-path"
and "scsi-target", each of which provides both a SCSIDevice and a
SCSIBus.
I plan to do this work using VSCSI and then cut-an^Wapply it later to
virtio-scsi. This way we can be reasonably sure that the approach will
be usable in the Linux virtio-scsi drivers too.
For an HBA like VSCSI or the upcoming virtio-scsi, which supports
multiple paths, you can add to your HBA:
- a scsi-path (id=1) which has two scsi-disks. Then the disks
will be at path 1, target 0, LUN 0/1
- a scsi-path (id=1) which has two scsi-targets each with a scsi-disk.
Then the disks will be at path 1, target 0/1, LUN 0
- a scsi-path (id=1) which has two scsi-targets each with two scsi-disk.
Then the four disks will be at path 1, target 0/1, LUN 0/1
- two scsi-path (id=1) each with two scsi-targets each with two scsi-disk.
Then the eight disks will be at path 1, target 0/1, LUN 0/1
- a scsi-target (id=0) which has two scsi-disks. Then the disks
will be at path 0, target 0, LUN 0/1
- a scsi-target (id=0) with two scsi-disks and a scsi-path (id=1) each with
two scsi-targets each with two scsi-disks. Then two disks will be at
path 0, target 0, LUN 0/1; four more will be at path 1, target 0/1,
LUN 0/1.
For an HBA like lsi, which only supports one level, you can add to your HBA:
- a scsi-target (id=0) which has two scsi-disks. Then the disks
will be at path 0, target 0, LUN 0/1
- two scsi-targets (id=0/1) which has two scsi-disks. Then the disks
will be at path 0, targets 0/1, LUN 0/1
- one scsi-target (id=0) which has two scsi-disks and one scsi-disk
(id=1). Then two disks will be at path 0, target 0, LUN 0/1,
the third will be at path 0, target 1, LUN 0.
and so on.
The patches do not provide the devices and relaying mechanism, but add
plumbing for parsing complex LUNs such as those used by VSCSI.
Patch 2 is useful on its own, because it fixes a mismatch in VSCSI's handling
of OpenFirmware and Linux LUNs. It adds the main parsing code, and I'll
probably resubmit it soon.
Patch 5 adds the infrastructure that will be used by the simple LSI case.
Patch 6 adds the infrastructure that will be used in the full case, and
already kind-of attaches VSCSI to it.
The other 3 are just complimentary.
Ideas? Does the interface seem applicable to libvirt?
Paolo Bonzini (6):
scsi: ignore LUN field in the CDB
scsi: support parsing of SAM logical unit numbers
scsi-generic: allow customization of the lun
scsi-disk: allow customization of the lun
scsi: let a SCSIDevice have children devices
scsi: add walking of hierarchical LUNs
hw/esp.c | 4 +-
hw/lsi53c895a.c | 2 +-
hw/scsi-bus.c | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/scsi-defs.h | 22 +++++++
hw/scsi-disk.c | 19 +++---
hw/scsi-generic.c | 41 +++++++++++--
hw/scsi.h | 17 +++++
hw/spapr_vscsi.c | 22 ++-----
8 files changed, 264 insertions(+), 33 deletions(-)
--
1.7.4.4
next reply other threads:[~2011-05-20 15:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 15:03 Paolo Bonzini [this message]
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 1/6] scsi: ignore LUN field in the CDB Paolo Bonzini
2011-05-20 16:15 ` Christoph Hellwig
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 2/6] scsi: support parsing of SAM logical unit numbers Paolo Bonzini
2011-05-25 13:05 ` Christoph Hellwig
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 3/6] scsi-generic: allow customization of the lun Paolo Bonzini
2011-05-25 13:10 ` Christoph Hellwig
2011-05-25 15:20 ` Paolo Bonzini
2011-05-27 13:04 ` Christoph Hellwig
2011-05-27 13:31 ` Paolo Bonzini
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 4/6] scsi-disk: " Paolo Bonzini
2011-05-25 13:13 ` Christoph Hellwig
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 5/6] scsi: let a SCSIDevice have children devices Paolo Bonzini
2011-05-20 15:03 ` [Qemu-devel] [RFC PATCH 6/6] scsi: add walking of hierarchical LUNs Paolo Bonzini
2011-05-20 16:14 ` [Qemu-devel] [RFC PATCH 0/6] SCSI series part 2, rewrite LUN parsing Christoph Hellwig
2011-05-20 17:37 ` Paolo Bonzini
2011-05-25 13:17 ` Christoph Hellwig
2011-05-25 15:08 ` 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=1305903817-25476-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).