Re: [PATCH 1/2] SCSI: Add a SCSI option for persistent device names in Kernel.

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

 



On Fri, Apr 8, 2011 at 18:14, Greg KH <greg@xxxxxxxxx> wrote:
> On Fri, Apr 08, 2011 at 08:14:12AM -0700, James Bottomley wrote:
>> So, while I agree totally with the above: udev and userspace is the way
>> to go, I'm not totally opposed to having a non-invasive mechanism for
>> indicating a user's preferred name for a device. ÂI think there are a
>> couple of ways to do this:
>>
>> Â Â Â1. Entirely in userspace: just have udev consult a preferred name
>> Â Â Â Â file and create say /dev/disk/by-preferred. ÂThen have all the
>> Â Â Â Â tools that normally output device information do the same (i.e.
>> Â Â Â Â since real name to preferred name is 1:1, they could all do a
>> Â Â Â Â reverse lookup).
>> Â Â Â2. have a writeable sysfs preferred_name field, either in the
>> Â Â Â Â generic device or just in SCSI. ÂThe preferred name would be
>> Â Â Â Â used by outbound only (i.e. kernel dev_printk messages and
>> Â Â Â Â possibly /proc/partitions). ÂAll inbound uses of the device
>> Â Â Â Â would come via the standard udev mechanisms
>> Â Â Â Â (i.e. /dev/disk/by-preferred would be the usual symlink). ÂThis
>> Â Â Â Â means from the kernel point of view, no renaming has happened.
>> Â Â Â Â We'd just try to print out the preferred name in certain
>> Â Â Â Â circumstances, which should solve most of the described problem.
>
> Either, or both, of those options are fine with me as well.

I guess a generic sysfs file, that can carry a user-given name for a
device, and which is looked-up with dev_printk() macro, and maybe
/proc/partitions is all what we would need if we want to involve the
kernel here.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux