improving device file creation - (MAKEDEV-2.5)

Richard Lightman richard at reika.demon.co.uk
Tue Jan 16 11:03:16 PST 2001


Misquoted from Richard Gollub on 2001/01/16 at 10:30 +0000:
> 
> 	Judging from the range of values for "minor" (which I observe in the
> document) it appears to me that this variable has a length of 8 bits
> (allowing values 0-255), and, therefore 255 is the logical limit for any
> partitioning scheme. As the "real" limit is quite lower, the explanation
> must come from other considerations (e.g., hardware) or conventions.
> 
> 	Can anyone more knowledgeable elaborate further on this, for the
> benefit of all interested list subscribers?
> 
You have found one of the reasons for devfs. Many years ago, someone
decided that there would never be more than 65536 devices, so
8bit major/8bit minor seemed plenty. Lots and lots of user space
tools 'know' that the number that identifies a device fits into
16 bits.

When about half the device numbers were assigned people decided there
was a problem. Devfs uses the existing numbers for legacy devices
and the free numbers for anthing new, but only if it is on you system.
If you have 30000 different devices on you system you will have problems.

Scsi was one of the big problems (partitions)*(logical units)*(physical
units)*(interfaces) is a large number of devices. devfs will but some of
these in the unassigned range of dev numbers. You can also get plenty
more pty's, and use lots of loop back file systems. The first person
to use all the remaining numbers get a prize! (Free use of the title:
"Smarta$$ with the most free time on LFS" ;-)

Richard


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list