[Debburn-devel] Re: broken device locking, sg vs. sg_io on block devices

Alan Cox alan at lxorguk.ukuu.org.uk
Wed Apr 11 11:31:02 UTC 2007


> > Can we do following without having side effects:
> > 
> > open("/dev/sr0",O_EXCL|O_RDWR); /* no matter what it returns */
> > fcntl(..., F_SETLK); /* no matter what it returns */
> > ioctl(f, SCSI_IOCTL_GET_IDLUN, &x);
> > ioctl(f, SCSI_IOCTL_GET_BUS_NUMBER, &jo);
> > 
> > Can you guarantee us that bit? 

open() has side effects. The CD layer allows you to open with O_NDELAY if
you want to avoid them.

> [1] and when we get real critical questions then everything we get is
> radio silence? Very kindly. NOT.

Given the attitude that was shown before be glad I'm even bothering to
reply to this.




More information about the Debburn-devel mailing list