Am Mittwoch, 16. Januar 2008 16:58:51 schrieb Alan Stern:
> On Wed, 16 Jan 2008, Oliver Neukum wrote:
> 
> > > This entire issue needs more thought.  There must be plenty of ioctl 
> > > calls which shouldn't force a device to remain resumed.
> > 
> > Sure. The question is whether it is worth a lot of effort to filter them.
> > Are ioctl()s on block devices common?
> 
> I have no idea.  My guess is that they are not, other than for devices
> not holding filesystems (e.g., audio CDs).

Do any of them use sd? If not I am happy with a working patch and
refining it later.

> > > Also, your implementation in terms of a single bit will work only for
> > > single-open devices.  If multiple-open is allowed then something would
> > > have to be stored in the file structure.  More generic code...
> > 
> > Why? I don't think you can assume that a user intends an ioctl() to be
> > "valid" only for the duration of that particular file. I intentionally put 
> > the
> > put into release which is called for the last close().
> 
> The only scenario where this would matter is when there are two 
> overlapping open calls, of which one uses ioctls and the other does 
> doesn't.  I can't think of any examples, except perhaps where somebody 
> does an ioctl on a mounted device (note that mounting a device does an

Exactly. In fact strictly speaking you must do it this way, or you have no
guarantee that you mount what you did an ioctl() on.

        Regards
                Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to