Re: block_dev.c not backward compatible with 2.2.15 APIs

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Fri Mar 31 2000 - 11:26:22 EST


Alexander Viro wrote:
>
> On Fri, 31 Mar 2000, Jeff V. Merkey wrote:
>
> > I also need it to locate all mirror groups and mirror members before
> > bringing the mirroring and hotfixing engine on line. This is why. If
> > there is a "cleaner" way to do this with a published API, please show
> > me. Also, attached is what I am doing in 2.0/2.2 -- it works great.
>
> It doesn't. ->ioctl() before ->open() is illegal. You may get out with
> that for some drivers, but it's not guaranteed to work. For one thing,
> it's an immediate race - think what will happen if rmmod will hit you
> while you are in ->ioctl().

This is nice to know, but it's not much help. Is there a cleaner way?
The simplest would be to allow me to scan the blkdev structure. I've
also noticed that in the cdrom drivers call ioctl_by_bdev() which would
be perfect to use, expect I cannot get a valid block_device * structure
because some of the functions are static.

What's the best method?

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:29 EST