login
Header Space

 
 

race between SCSI uevents and media detection

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-scsi@...>, <linux-kernel@...>
Cc: <kay.sievers@...>
Date: Tuesday, March 18, 2008 - 1:21 pm

For a typical livecd boot using udev, you'd check for the root device
with a udev rule like:

KERNEL=="sr[0-9]", PROGRAM=="/lib/udev/vol_id -l %N", RESULT="<some label>",
	SYMLINK+="root"

This creates a /dev/root symlink to whichever CD device holds the proper
CD/DVD.

However, this currently fails repeatedly on some machines, as the run
of vol_id gets ENOMEDIUM attempting to open the CD device. I suspect
this is because the initial medium scan is actually done after the
uevent for /dev/sr0 is emitted.

Can the open path be fixed to block until the medium state is initially
known? I don't see how this can be worked around from userspace - you
don't get another uevent for the media detection.

Bill
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
race between SCSI uevents and media detection, Bill Nottingham, (Tue Mar 18, 1:21 pm)
speck-geostationary