[PATCH 04/24] scsi-multipath: introduce scsi_mpath_device_class
Hannes Reinecke
hare at suse.com
Mon Mar 2 23:16:49 PST 2026
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).
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' ?
And, of course: how can we get the topology?
Do we get a list of the underlying scsi devices from sysfs?
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.com +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list