lkml.org 
[lkml]   [1998]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: scsi naming (was: devfs patch v3)
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...)

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

-=- James Mastros
--
Agent K: A person is smart; people are dumb, panicky animals and you know
it. Fifteen hundred years ago, everybody knew that the Earth was the
center of the Universe. Five hundred years ago, everybody knew that the
Earth was flat. Fifteen minutes ago, you knew that humans were alone on
this planet. Just think what you'll know tomorrow.

-=- Men In Black (1997, Paramount)


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.197 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site