Re: block_dev.c not backward compatible with 2.2.15 APIs

From: Alexander Viro (viro@math.psu.edu)
Date: Fri Mar 31 2000 - 11:43:04 EST


On Fri, 31 Mar 2000, Jeff V. Merkey wrote:

> 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?

If you want the stuff on devices served by already loaded drivers (and
main kernel) - look through the gendisk_head list. However, I think that
scanning for something that looks like your data is both unsafe and rude -
somebody might just back one of the partitions up on another disk. With
obvious results. I would rather have the set as a config option, quite
probably with the procfs file to pass it through (so that the set could be
figured out in userland). YMMV, but pushing the code into kernel is always
a bad idea.

-
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