Re: [PATCH] register_blkdev

Linus Torvalds (torvalds@transmeta.com)
Fri, 7 Mar 2003 17:13:34 -0800 (PST)


On Fri, 7 Mar 2003, Andrew Morton wrote:
>
> Some time back Linus expressed a preference for a 2^20 major / 2^12 minor split.

Other way around. 12 bits for major, 20 bits for minor.

Minor numbers tend to get used up more quickly, as shown by the current
state of affairs, and also as trivially shown by things like pty-like
virtual devices that pretty much scale arbitrarily with memory and users.

I don't much care personally. I think the devil is in the details, and
making sure we don't have legacy code that just knows about the fact that
it can index a 256-entry array with the minor number.

Also, I have to say that over time I've become convinced that it's just a
painful mistake to mix up minor and major numbers, so it might well be
sensible for people who actually care about them to always keep them
separate. That would actually imply that 32+32 is the right thing to do
internally after all, and any other limits (whether they be 8+8, 12+20 or
16+16) would be limited by things like over-the-wire or on-the-disk
representations.

Linus

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