Re: Larger dev_t

Tim Jansen (tim@tjansen.de)
Wed, 28 Mar 2001 14:11:35 +0200


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/