Messages in this thread | | | Date | Mon, 12 Jan 1998 09:06:24 +1100 | From | Richard Gooch <> | Subject | Re: scsi naming (was: devfs patch v3) |
| |
James Mastros writes: > On Mon, 12 Jan 1998, Richard Gooch wrote: > > James Mastros writes: > > > [...] > > > I should think that we want them as deep as we can go. After-all, there is > > > an overhead of one dentry and one inode in memory for each one, but we only > > > have that overhead for directories that we acatually have... So my > > > suggested directory structure looks like: > > > > > > SCSI/ > > > c/ > > > controller > > > b/ > > > bus > > > id/ > > > id > > > lun/ > > > lun > > > partition > > > > > > (where the direcories c, b, id, and lun (and the node partition) are > > > numbers, and the nodes controller, bus, id, and lun are nodes for ioctls > > > that effect the entire controller, bus, id, or lun). Indeed, perhaps the > > > partitions should be directories that mirror the partition structure on-disk > > > (so exteneded dos partitions would be directories.) Note that my scheme > > > dosn't diferincate between hard-drives, tape-drives, cdrom-drives, and > > > generics -- I think that they should be merged: does anybody know why they > > > weren't in the first place? (I don't have any SCSI devices, so I don't > > > really know.) > > > > Firstly, I think the entire SCSI disc should be a file: reading and > > writing directories seems not to be the done thing. I note that ext2 > > disallows reading of directories, and the VFS disallows opening of > > directories in write mode. > > Huha? My plan has the disk as one node, just like every other plan. I have > a node for the whole controller, bus, id and lun as well (the current scheme > has a whole-lun = whole-disk node, but none of the others. Then, within > each controller, there is a directory for each bus. (similar for bus->id, > id->lun, lun->partition). That is to say, the node for the 1st bus on the > 1st controller is SCSI/1/1/bus. The whole disk of the 2nd lun on the 3rd > device on the 4th bus of the 5th controller is SCSI/5/4/3/2/lun. Etc, etc...)
OK, sorry, I misunderstood.
> > Secondly, take drives don't have partitions. I dunno about CD-ROMS. > Exactly; that's what the SCSI/c/b/i/l/lun is for. The whole lun is the > whole disk, regardless of if it has partitions on it or not. > > > Thirdly, I think you *want* to differentiate between hard discs and > > tape drives, at a fairly high level. "What tape drives do I have?" > > Looking for one tape driver amongst 100 SCSI discs is like looking for > > a needle in a haystack. > > Why not simply have an "indetify" ioctl?
Because I want it to be obvious from the entries in /dev, just using <ls>. Perhaps we could support your system *in addition* to one that differentiates between SCSI types. But that costs more devfs inodes...
Regards,
Richard....
| |