From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 30 Dec 2005 18:56:52 +0000 Subject: Re: new version of udev has different cd/dvd devices Message-Id: <20051230185652.GA5625@vrfy.org> List-Id: References: <43B313ED.40402@bl.com> In-Reply-To: <43B313ED.40402@bl.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, Dec 29, 2005 at 11:46:59PM -0800, Greg KH wrote: > On Thu, Dec 29, 2005 at 12:29:36AM +0100, Kay Sievers wrote: > > On Wed, Dec 28, 2005 at 11:50:00PM +0100, Marco d'Itri wrote: > > > On Dec 28, Moshe Yudkowsky wrote: > > > > > > > The latest udev (0.079) puts the second drive only for /dev/cdrom, cdrw, > > > > dvd, and dvdrw. > > > Do not use %e in rules. > > > > Yes, %e will be removed in one of the next versions for that reason. It > > never worked reliably outside of udevstart, which is no longer > > recommended to use. > > Yeah, but we still need a way to enumerate devices in some kind of > order, like we do for the cdrom devices today. So I don't think we can > drop it entirely. We don't have any "order", that's why we can't do it that way. The persistent /dev/disk links are working without any "order", that's the model to follow, or writing out "automatic rules" to provide stable names. Everything else will just not work. > > Yuu can match on ENV{ID_PATH} with custom rules for every device. On > > SUSE, the system management creates rules on installation or update, to > > have always the same names for optical drives, regardless of the order > > of discovery: > > > > $ cat /etc/udev/rules.d/65-cdrom.rules > > # cdrom links generated by YaST2 > > # > > SUBSYSTEM="block", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-1:0:0:0", SYMLINK+="cdrecorder cdrom" > > > > Distros could also have a "default" rule, which catches unconfigured > > devices and automatically creates a rule for them to keep the name > > stable across reboots. > > Or we can just stick with the rules we have today that use %e just fine, > as it emulates exactly what a static /dev would have done, and no one is > complaining about it :) No, %e doesn't work "fine" without udevstart. Device names switch with every reboot, depending on random device response and process running time, which is unacceptable and %e must be avoided for that reason. And worse, %e does not use locking, so for parallel probing, it will return the same names for different devices, if they are requested in parallel in a short timeframe. Kay ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel