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

Re: How to coordinate a DVD burn program with udev ?

On Thu, 2011-09-15 at 13:29 +0200, Thomas Schmitt wrote:
> Hi,
> i am upstream developer of libburn and CD/DVD/BD burn program xorriso.
> It seems urgent that i coordinate the activities of libburn with the
> activities of udev.
> What is the recommended way for a library resp. a console program
> to tell udev, that a CD drive and the media will undergo arbitrary
> changes and should not be accessed during that time ?

There isn't one.  And I don't see any reason why udev should try to
reidentify a CD drive on a 'change' event.  I mean, it's not exactly
likely to change itself to be capable of handling a new disc format that
would deserve an additional symlink name.

> On an installation of Debian GNU/Linux 6.0.2 amd64, /dev/dvdrw vanishes
> if libburn loads the tray. It comes back only if some other program run
> uses the /dev/sr device file to which the link should point.

I assume the other symlinks to this device also disappear?

> The vanishing link is accompanied by these messages in /var/log/daemon.log :
> ------------------------------------------------------------------
> Sep  9 22:00:41 debian2 udevd[435]: seq 1274 queued, 'change' 'scsi'
> [...]
> Sep  9 22:00:41 debian2 udevd-work[21697]: 'cdrom_id --export /dev/sr0' started
> Sep  9 22:00:41 debian2 cdrom_id[21698]: custom logging function 0x7f17909c9010 registered
> Sep  9 22:00:47 debian2 cdrom_id[21698]: unable to open '/dev/sr0'
> Sep  9 22:00:47 debian2 udevd-work[21697]: '/lib/udev/cdrom_id' (stderr) 'unable to open '/dev/sr0''
> Sep  9 22:00:47 debian2 udevd-work[21697]: 'cdrom_id --export /dev/sr0' returned with exitcode 1
> [...]
> Sep  9 22:00:48 debian2 udevd-work[21697]: update old name, '/dev/dvdrw' no longer belonging to '/devices/pci0000:00/0000:00:11.0/host2/target2:0:0/2:0:0:0/block/sr0'
> Sep  9 22:00:48 debian2 udevd-work[21697]: no reference left, remove '/dev/dvdrw'
> [... no attempt to create a new /dev/dvdrw ...]
> Sep  9 22:00:48 debian2 udevd[435]: seq 1275 done with 0
> ------------------------------------------------------------------
> It looks as if xorriso's activities block the drive while udev is trying
> to get access to it in the time between 22:00:41 and 22:00:47.



Ben Hutchings
All extremists should be taken out and shot.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: