Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 1995 00:33:08 -0700 (PDT)
From:      Julian Elischer <julian@ref.tfs.com>
To:        rgrimes@gndrsh.aac.dev.com (Rodney W. Grimes)
Cc:        hackers@FreeBSD.org
Subject:   Re: [DEVFS] your opinions sought!
Message-ID:  <199504190733.AAA07567@ref.tfs.com>
In-Reply-To: <199504190641.XAA01137@gndrsh.aac.dev.com> from "Rodney W. Grimes" at Apr 18, 95 11:41:25 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> [Should this really be on 3 lists??? ]
well I wante dthe widest group :^|
> > 
> 
> I think you are confused about a few things, or at least from looking
> at this it leaves me confused:-(.

I basically want to know how people think devices (e.g. disks)
should be represented....
how would YOU do it if you had the ideal oportunity..
I may not be able to do everything people want but I'd like to KNOW
what they think would be best..

A real-life example is:
4031783168    0 dr-xr-xr-x    4 root     wheel          13 Dec 31  1969 /devfs/
4031595520    0 drwx---rwx    4 root     staff          29 Dec 31  1969 /devfs//disks
4031796480    0 dr-xr-xr-x    2 root     wheel          16 Dec 31  1969 /devfs//disks/rfloppy
4030327040    0 crw-r--r--    2 root     wheel      9,   0 Dec 31  1969 /devfs//disks/rfloppy/fd0.1440
4031798400    0 dr-xr-xr-x    2 root     wheel          16 Dec 31  1969 /devfs//disks/floppy
4030326528    0 brw-r--r--    2 root     wheel      2,   0 Dec 31  1969 /devfs//disks/floppy/fd0.1440

note that if the disks had been 1.2MB, the names would have said so..

> 
> > 
> > /devices/disks/sd0/all
> Okay, that is the entire disk.
yes
> 
> > /devices/disks/sd0/FAT/all	/* I suppose it could be called C: */
> Ah, is that the FAT in slice 0 (DOS would call it partition 0, and it
> would *probably* be the C: drive).  Or is this something else?  You
> do realize there can be more than 1 primary FAT partition per volume,
> though DOS won't grok more than 1 primary active at a time.  
ok, ok, that's quibling.. what I want to know is what you think
about the general scheme.. we can tweek it if needed..

> 
> > /devices/disks/sd0/BSD/all
> == BSD/c???
> And what happens when I have more than 1 BSD slice on a disk (this is
> one of the reasons for the slice code after all).
ok, ok, BSD0, BSD1, etc
> 
> > /devices/disks/sd0/BSD/a
> > /devices/disks/sd0/BSD/b
> > /devices/disks/sd0/BSD/c
> > /devices/disks/sd0/99/all	/* MACH but not recognised */
> > /devices/disks/sd0/DOSX/all
> > /devices/disks/sd0/DOSX/A
> > /devices/disks/sd0/DOSX/B
> 
> Is this an extended partition?  If so, extended partitions are not DOS
> specific.
I don't really care.. it could read:
/devices/disks/sd0/EXT1/BSD2/all
/devices/disks/sd0/EXT1/BSD2/a
/devices/disks/sd0/EXT1/BSD2/b
/devices/disks/sd0/EXT1/FAT2/A


what I want is people's ideas on WHAT shouldbe there..
The naming is not implimented yet because it would be the 
responsibility of the SLICE code to do the naming.. the DEVFS doesn't care..
it just shows what it's told to show by the device driver (or the slice
code in this case).

> 
> I think you have transposed our definitions.  A ``Slice'' is either one of
> the 4 primary MBR entries, or 1 of the 26 (is that the right number Bruce?)
> logical volumes in an extended MBR entry.  
could be.. I'm not fussed by it.. I want Ideas..
> 
> > 
> > /devices/sd0
> > /devices/sd0P0
> ...
> > /devices/wd0P0Sa
> > 
> > 
> > Whichever scheme is chosen, I expect a  link (or symlink) from
> > /devices/scsi/bus0/targ0/lun0/all->/devices/disks/sd0/all
> > or something similar
> > e.g.
> > /devices/scsi/b0t0l0 -> ../../disks/sd0  (?)
> > or
> > /devices/scsi/b0t0l0_all hardlink to /devices/sd0  (?)
> > /devices/scsi/b0t0l0_P0 hardlink to /devices/sd0P0  (?)
> > /devices/scsi/b0t0l0_P1Sa hardlink to /devices/sd0P1Sa  (?)
> 
> And who creates these symlinks/hardlinks?  And why do we need them?
because some people want a constant way of
addressing scsi1,target2,lun0, partition b, that won't go away
or change if some OTHER device fails to probe..

a device can easily have two names, one of which is invariant....

> How much memory does all this devfs data structure take up?

basically, in this version, each node takes..

the size of the name in ascii..
+ 36 bytes
+ 80 bytes
+ N x 32 bytes where N is nearly always 1
let's say 160 bytes
that seems a lot, but consider..

The next version will allow a more compact representation,
so that some devices (e.g. pty[0-N] will be 'algorythmically'
stored.. i.e. storage will exist as long as there is a vnode
associated with it, (it's open).
If you open 2, only 3 will be displayed.. (there will always be one
more than are in use, so that there is one to open..)
remember there are only nodes for devices and slices that ACTUALLY EXIST.
/dev/today contains ALL POSSIBLE devices.. i.e. many more..

for my laptop.. there would be: the equivalent of
wd0a wd0b wd0c wd0d wd0e wd0f 
rwd0a rwd0b rwd0c rwd0d rwd0e rwd0f
pty0 (if you have none open)
tty00 tty01
speaker
lpr
fd0 rfd0
vty{0,1,2,3}
mem, kmem
drum? (does it exist any more?)
I'm running out here...
(maybe I missed some..)
plus a couple of directories


let's say it was 6k of data....
I think that's being very realistic

> 
> > (also symlinks are not supported yet)
> 
> :-(.

I said YET  :)

> Rod
julian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504190733.AAA07567>