Skip to content

RFC scsi-disk: Active/passive ALUA support

Hannes Reinecke qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8scsi-disk: Add 'port_group' propertyhw/scsi/scsi-disk.c+12 -00 replies
2/8scsi-disk: Add 'alua_state' propertyhw/scsi/scsi-bus.c hw/scsi/scsi-disk.c include/block/scsi.h +1 more+158 -00 replies
3/8scsi-disk: Implement 'REPORT TARGET PORT GROUPS'hw/scsi/scsi-disk.c+158 -10 replies
4/8scsi-disk: Implement 'SET TARGET PORT GROUPS'hw/scsi/scsi-disk.c include/block/scsi.h+123 -00 replies
5/8scsi-disk: implement ALUA policyhw/scsi/scsi-disk.c+204 -70 replies
6/8scsi-disk: Allow READ CAPACITY in standbyhw/scsi/scsi-disk.c+16 -00 replies
7/8scsi-disk: Implement 'alua_preferred' optionhw/scsi/scsi-disk.c+37 -00 replies
8/8block: Implement 'block_disconnect' HMP commandblock.c block/block-backend.c blockdev.c +10 more+115 -01 reply

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 RFC 0/8] scsi-disk: Active/passive ALUA support

Hi all,

here's now an updated version to enable ALUA and simplified active/passive multipath support for qemu.

This patchset relies on having _two_ block devices configured, and two SCSI disks pointing to those block devices with the _same_ 'wwn' property and unique 'port_group' properties. I know, this is a bit of a nasty hack, but I hope to add proper multipath support (with several SCSI devices pointing / linking to the same block device) in the near future.

It also implements a 'alua_policy', which allows for simulating an 'active/passive' multipath setup.

And for testing I've implemented a 'block_disconnect' HMP command, which simulates a link failure for the attached devices.

I wouldn't object if someone declares this a gross hack, but with it I can finally simulate real-life multipath failover and do some functional multipath-tools testing withouth having to recurse on using real hardware.

As usual, comments and reviews are welcome.

Hannes Reinecke (8):
scsi-disk: Add 'port_group' property
scsi-disk: Add 'alua_state' property
scsi-disk: Implement 'REPORT TARGET PORT GROUPS'
scsi-disk: Implement 'SET TARGET PORT GROUPS'
scsi-disk: implement ALUA policy
scsi-disk: Allow READ CAPACITY in standby
scsi-disk: Implement 'alua_preferred' option
block: Implement 'block_disconnect' HMP command

 block.c                        |   5 +
 block/block-backend.c          |   8 +
 blockdev.c                     |  18 ++
 hmp-commands.hx                |  14 +
 hmp.c                          |  10 +
 hmp.h                          |   1 +
 hw/scsi/megasas.c              |   4 +
 hw/scsi/scsi-bus.c             |  20 ++
 hw/scsi/scsi-disk.c            | 654 +++++++++++++++++++++++++++++++++++++++++
 hw/scsi/virtio-scsi.c          |   5 +
 include/block/block.h          |   1 +
 include/block/block_int.h      |   1 +
 include/block/scsi.h           |  18 ++
 include/hw/scsi/scsi.h         |   8 +
 include/sysemu/block-backend.h |   1 +
 qapi/block-core.json           |  21 ++
 qmp-commands.hx                |  26 ++
 17 files changed, 815 insertions(+)
Signature · 1 line
1.8.4.5