Re: Larger dev_t

Tim Jansen
2001-03-28T12:09:32Z

On Tue, Mar 27, 2001 at 10:48:13AM -0800, Linus Torvalds wrote:
> So in /dev, there are two problems: we are getting painfully close to
> major numbers with 8 bits, and we've run out of minors several times. In
> fact, a lot of the reason for the dearthness of major numbers is the fact
> that we use multiple majors for some stuff that really wants many minors.

Are the major/minor numbers neccessary at all? They were a kludge to
represent devices in the file system because there wasnt something like
DevFS in the dark ages of Unix. But if you take DevFS as given you can get
rid of all these problems that major/minor numbers cause, just register your
file_operation structure directly instead of your maj/min pair (plus, maybe,
some private data that replaces any information that was encoded in the
minor number).

While DevFS may not be very popular this could actually reduce the amount of
code in the kernel, which was one of the main arguments against DevFS AFAIK.
And if you dont like the fact that DevFS assignes the file names you could
mount DevFS in a different directory and use symlinks from /dev to the
device tree (like Solaris does?).

bye...