Re: devfs

Albert D. Cahalan (acahalan@cs.uml.edu)
Thu, 8 Jan 1998 19:15:56 -0500 (EST)


>>> "#2. Ptys aren't very clean". No kidding. But there are much much
>>> better ways of fixing the ptys than building a devfs. Ptys have a
>>> fairly specific problem that nothing else in the /dev world does.
>>
>> If any 'better' scheme you suggest involves having a inode on disk for
>> every open pty then you are crazy... On a large system with hugh numbers
>> of people online there you have to be many inodes, furthermore, every
>> access to a pty (and every chown and all) would require updating the
>> times, a serious overhead hard disk wise.
>
> Laugh. Think 'caching' which is done right now for the current
> scheme. Even 1000 people logged in for 2000 inodes is a trivial
> number of inodes.

Hmmm, a 64 kB /dev with linear ext2 searching. Ouch.
But that isn't as bad as it gets when you add SCSI.

>>>> *** NTFS ***
>>> non-unix file system.
>>
>> Ahh, but it is posix complient, and would be useable with the
>> adition of devfs..
>
> Posix complient means nothing. Go and see what you actually need to
> make posix. It's bugger all. Certainly not a terribly useful system.
>
> pty's aren't minimal posix to start with, ditto devices!

Yes, which is why an NTFS system requires a devfs. I guess you agree.

>> Another argument for devfs, is a sane scsi enumerating scheme (look to
>> other posts to find out why it's needed).. It would be difficult do handle
>> this (just to handle a single controler worth of names, accounting for
>> setting up names for 6 partitions and 3 luns would require 864 nodes,
>> idealy you would want to support 3 controlers, and the maximum luns
>> available)..
>
> This isn't an argument for devfs. This is an argument for a larger
> dev_t size. Before you can claim this as a reason for building a
> devfs, you need to detail exactly how a devfs is magically going to
> fix the above problem.

Sanity check time! Let's see if your "fix" would work.

bus 4 bits
unit 8 bits
LUN 8 bits
partition 6 bits
raw/cook/etc 2 bits

Fine, /dev will be 4 to 8 GB. The linear search will be fun!
Seriously, a larger dev_t will _not_ fix this problem.