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:15:49 EST


Alexander Viro wrote:
>
> Not. Care to explain why are you going to do that, in the first place?
> Notice the existance of gendisk_head which might be what you want.
> However, I see absolutely no valid reasons for filesystem to scan all
> disks. What are you actually trying to do?

NetWare does not follow the Unix model of "one partition, one file
system tree" (which is an ancient and limiting architecture for File
Systems). The model linux is taking is almost identical to NT, a model
where the I/O subsystem presents single partitions through a very
restrictive I/O interface. (Doing this in NT is extremely nasty -- I
have to build a disk and partition pointer map in user space, then pass
it to the driver via an IOCTL to the Windows NT NetWare File System).

NetWare uses a multi-segmented architecture where several segments for a
particular volume can be stripped across multiple drives (a single
NetWare partition can host 8 volumes segments per partition, and these
segments can be for the same volume or 8 other stripped volumes). I
need to be able to scan the volume tables on each NetWare partition in
order to build a global map of all NetWare volume segments on all drives
(a single sector read per drive to locate the volume segment tables).

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.

Jeff

   
          inode.i_rdev = dev;
          fops = get_blkfops(major); // if no fops jump table, error
          if (!fops || !fops->ioctl)
             continue;

          retCode = fops->ioctl(&inode, 0, HDIO_GETGEO, (ULONG)&geometry);
          if ((retCode == -EINVAL) || (retCode == -ENODEV))
             continue;

          // now we can safely open the device

          inode.i_rdev = dev;
          retCode = blkdev_open(&inode, &fil);
          if (retCode)
             continue;

-
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