From mboxrd@z Thu Jan 1 00:00:00 1970 From: "'Kay Sievers'" Date: Fri, 06 Feb 2004 09:18:23 +0000 Subject: Re: inconsistent renaming of devices Message-Id: <20040206091823.GA4782@vrfy.org> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Feb 06, 2004 at 11:52:31AM +0530, Surekha.PC wrote: > > > On Thu, Feb 05, 2004 at 03:29:41PM +0530, Surekha.PC wrote: > > It seems the user<->kernel race still persists. > > > > During device addition randomly few device/partition entries are not > > getting created. If debug is enabled all devices are created. With > > debug turned off, only few of them are created. So in this case I am > > not able to capture debug for devices not getting created. > > > > Again device removal is also having the similar inconsistent > > behaviour. Irrespective of debug being on/off few stale device entries > > > are retained under /udev. > > > > In this scenario I could see some debug messages as below. > > > > Looks like the sysfs entries for the device are removed long before > > udev lookup. > > }We don't need sysfs for device removal. > > >>>> It seems that udev is trying to lookup the > "/class/scsi_device/40:0:38:1" from the debug below ? No, it tries to find the device in its own database. If udev creates a devices it maintains a record with the devpath in a database and on removal it looks up the database for the name to remove. There is no sysfs lookup. We just don't find the device for removal, cause we have never created one. > > ---------------------------------------------------------------------- > > -- > > ----------------- > > udev_hotplug: looking at '/block/sdc' > > udev_hotplug: looking at '/block/sde/sde2 > > udev_hotplug: looking at '/block/sde/sde3 > > get_dirs: sysfs_path='/sys' > > udev_hotplug: don't care about 'scsi_device' devices > > ..... > > namedev_init_rules: reading '/etc/udev/udev.rules' as rules file > > ..... > > udev_hotplug: looking at '/block/sdc/sdc3 > > udev_hotplug: don't care about 'scsi_device' devices > > udev_remove_device: name is 'iscsib0t38l0sd3' > > ...... > > udev_remove_device: '/class/scsi_device/40:0:38:1' not found in > > database, falling back on default name > > > }Huh, what version of udev is this? > }'scsi_device' is blacklisted. > > >>>> I am using the latest udev-016 package. Ahh, I see your driver seems to create a hotplug event with the devpath '/class/scsi_device/*' and the sysbsystem 'block' so it bypasses our blacklist. Greg, must we check the devpath too in udev, or is the driver to be fixed? thanks, Kay ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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