[lkml]   [1998]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: scsi naming (was: devfs patch v3)
James Mastros writes:
> On Sun, 11 Jan 1998, Richard Gooch wrote:
> [...]
> > However, this raises an issue that's been troubling me: how deep a
> > directory structure should be implemented for SCSI discs? If you
> > imagine a system with 8 SCSI hosts each with 8 SCSI channels (buses)
> > with 8 drives per channel and 8 partitions per drive (let's leave the
> > number of LUNs to a measly 1), that's 4096 directory entries in
> > /dev/sd, which is painful to <ls>. Note that is a rather large system
> > (someone with a huge disc farm), but the point is valid.
> > So perhaps it would be better to have:
> > /dev/sd/H/CciIlLpP
> >
> > But that's still 512 entries in each /dev/sd/*, so instead we could
> > have:
> > /dev/sd/H/C/iIlLpL
> >
> > which brings it down to 64. But then you can argue that you may have
> > only 1 host with 8 channels, 8 targets per channel and 8 LUNs per
> > target, each with 8 partitions. And on it goes.
> >
> > So, before I make any changes towards subdirectories in /dev, I want
> > to get some kind of consensus (at least from those not implacably
> > opposed to devfs) as to how deep these directory structures should go.
> 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:
> 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.

Secondly, take drives don't have partitions. I dunno about CD-ROMS.

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.


 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans