On 03/03/2026 07:16, Hannes Reinecke wrote:
On 2/25/26 16:36, John Garry wrote:
Introduce a new class for multipathed devices, scsi_mpath_device_class.
The purpose of this class is for managing the scsi_mpath_head.dev member.
The naming for the scsi_device structure is in form H:C:I:L,
where H is host, C is channel, I is ID, and L is lun.
However, for a multipathed scsi_device, all the naming members may be
different between member scsi_device's. As such, just use a simple
single-number naming index for each scsi_mpath_head.
The sysfs device folder will have links to the scsi_device's so, it will
be possible to lookup the member scsi_device's.
An example sysfs entry is as follows:
# ls -l /sys/class/scsi_mpath_device/0/
total 0
drwxr-xr-x 2 root root 0 Feb 24 11:56 power
lrwxrwxrwx 1 root root 0 Feb 24 11:56 subsystem -
> ../../../../class/scsi_mpath_device
-rw-r--r-- 1 root root 4096 Feb 24 11:55 uevent
-r--r--r-- 1 root root 4096 Feb 24 11:56 wwid
# cat /sys/class/scsi_mpath_device/0/wwid
naa.600140505200a986f0043c9afa1fd077
Ah, here it is.
So you can ignore my comments from the previous patch.
(and you might think of merging this and the previous patch).
ok, I can reorder and/or merge.
But device naming is still dodgy. A plain number has so many ways of
being misinterpreted.
Wouldn't it be better to name it 'mpathX' ?
sure, maybe that is better. Any other naming suggestions? Originally I
had smpdX (but dropped it), where that is "Scsi MultiPath Device" and X
is a number index.
Cheers