Re: block_dev.c not backward compatible with 2.2.15 APIs

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Sat Apr 01 2000 - 17:20:59 EST


Stephen,

This is probably easier than the patch I've been working on today. Do I
need to hold lock_kernel() over the gen_disk head (I assume so)?

Jeff

"Stephen C. Tweedie" wrote:
>
> Hi,
>
> On Fri, Mar 31, 2000 at 09:26:22AM -0700, 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.
>
> Scan the gendisk_head list. That contains all present disks and
> partitions (as visible in /proc/partitions). It also contains the
> partition type information if you want to restrict your volume
> scan to specific partition types (this is how the software raid
> code performs its scan for raid autostart devices, for example).
>
> --Stephem

-
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 Apr 07 2000 - 21:00:08 EST