Skip to content

SCSI ALUA support

Hannes Reinecke qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scsi-disk: Add 'port_group' propertyhw/scsi/scsi-disk.c+12 -00 replies
2/3scsi-disk: Add 'alua_state' propertyhw/scsi/scsi-bus.c hw/scsi/scsi-disk.c include/block/scsi.h +1 more+106 -00 replies
3/3scsi-disk: Implement 'REPORT TARGET PORT GROUPS'hw/scsi/scsi-disk.c+156 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] SCSI ALUA support

Hi all,

here's a patchset to implement ALUA support for SCSI disks. With it we can easily simulate a multipath setup:

-drive <drive>,if=none,id=disk1 \
-device scsi-disk,wwn=<wwn>,port_group=1,port_index=1,alua_state=0 -drive <drive>,if=none,id=disk2 \
-device scsi-disk,wwn=<wwn>,port_group=2,port_index=1,alua_state=2

What's a bit annoying is that one has to reference the underlying block device _twice_, which means one has to stick with the 'raw' format as anything more elaborate will cause data corruption on the guest if both paths are active. Also the 'wwn' property is _actually_ a property of the underlying block device, not the scsi disk.

This patchset implements 'implicit' ALUA mode only for the moment; full explicit ALUA support involves quite a bit of logic in the qemu backend.

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
scsi-disk: Add 'port_group' property
scsi-disk: Add 'alua_state' property
scsi-disk: Implement 'REPORT TARGET PORT GROUPS'

 hw/scsi/scsi-bus.c     |  15 ++++
 hw/scsi/scsi-disk.c    | 240 +++++++++++++++++++++++++++++++++++++++++++++++++
 include/block/scsi.h   |  13 +++
 include/hw/scsi/scsi.h |   6 ++
 4 files changed, 274 insertions(+)
Signature · 1 line
1.8.4.5