Currently, virtio-scsi supports only one target with 16383 LUNs, which
fits nicely with what CTL provides. It would be useful to support more
than that, multiple targets each with 16383 LUNs.
While this can be useful with CTL by attaching each target to another
CTL target port, this will be necessary to support SCSI passthrough.
The new syntax for configuring targets will look like this:
-s X,virtio-scsi,target=/dev/foo,target=/dev/bar,target=/dev/baz
This will create the following configuration nodes:
pci.0.X.0.device=virtio-scsi
pci.0.X.0.target.0=/dev/foo
pci.0.X.0.target.1=/dev/bar
pci.0.X.0.target.2=/dev/baz
The existing configuration syntax is still understood for compatibility:
(1) -s X,virtio-scsi
(2) -s X,virtio-scsi,/dev/foo
(3) -s X,virtio-scsi,dev=/dev/foo
This will create the following configuration nodes:
pci.0.X.0.device=virtio-scsi (1, 2, 3)
pci.0.X.0.target.0=/dev/cam/ctl (1)
pci.0.X.0.target.0=/dev/foo (2, 3)
This is currently also under review in illumos: https://code.illumos.org/c/illumos-gate/+/4423