Re: [RFC PATCH] libata: sysfs naming option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/5/22 16:41, Hannes Reinecke wrote:
> On 1/5/22 07:18, Damien Le Moal wrote:
>> On 1/3/22 18:09, Hannes Reinecke wrote:
>>> This patch adds a config option ATA_SYSFS_NAMING to align the libata
>>> device names in sysfs with those in the kernel message log.
>>> It adds a new dummy bus 'ata', which collects all ata device objects
>>> like ata_port, ata_link, and ata_dev, and adds an 'ata' prefix to the
>>> message log.
>>> For consistency the 'ata_dev' name has been changed from 'ata' to 'dev';
>>> as this induces a sysfs change the config option is disabled per default.
>>>
>>> Patch is relative to the 'for-5.17-logging' branch from Damien.
>>
>> FYI, I queued the logging series in for-5.17, minus this patch.
>> Everything is in for-next too to check that nothing is broken.
>>
>> For this patch, as I commented, I think we can keep a backward
>> compatible naming using sysfs symlinks. But I am not entirely sure if
>> that can work with port-multiplier setups. Let's work on that for the
>> next cycle ?
>>
> Well, I'm not terribly happy about the current port multiplier 
> implementation, either.
> Currently they are named 'ataX.Y.0', making them the only ata objects 
> with three levels. Personally I would take the PATA master/slave thingie 
> as an example, and just increase the last number (such that we would 
> have ata1.0, ata1.1, ata1.2 etc).
> Reasoning here is that PMP is pretty much an SATA thing, and 'slave' 
> drives is a PATA thing. So they'll never clash.

Sounds sane to me.

> 
> As for the 'ataX.Y' link; that'll require even more sysfs trickery.

Hmm, as long as we can create sysfs paths that are compatible with the
old naming scheme (which seem to differ only for the root port object
name), it may be as simple as calling sysfs_create_link() for the port
objects ?

> Let's see if I can come up with something.
> So yeah, let's hold off the patch for now.
> 
> First I need to get a PMP cable to test things out :-)

I do have some in the lab, so I can test. Just need to go to the lab,
for once :)

> 
> Cheers,
> 
> Hannes


-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux