On Wed, 21 Jun 2006, Andreas Mohr wrote:
> > The real problem seems to be that the device is reachable in two different
> > ways, and they don't implement proper mutual exclusion. HAL (or your test
> > program) is undoubtedly using /dev/sr0 or something similar, whereas
> > cdrecord uses /dev/sg0. Going through two different drivers, it's no
> > surprise they wind up interfering with each other.
>
> HAL is /dev/host0/.../cd
That goes through the sr driver.
> cdrecord is -dev=0,0,0 (whatever Linux device file this translates into)
> or a similar device ID as returned by -scanbus.
That goes through the sg driver.
> Probably (stating the obvious here, I'm afraid) we should only send
> non-ALLOW_MEDIUM_REMOVAL for the *very first* device open,
> and then send ALLOW_MEDIUM_REMOVAL after the *very last* device close only.
>
> So you think that with sr and sg drivers both talking to the device,
> proper inter-driver device tracking is not doable or quite difficult
> to implement?
Well, it's not being done now. I suspect it wouldn't be too difficult
technically. The hardest part might be to obtain the agreement of the
SCSI and CDROM developers. :-)
Alan Stern
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]