Re: Larger dev_t

Linus Torvalds
2001-03-26T22:15:49Z

On Mon, 26 Mar 2001, John Byrne wrote:

> > Re: Larger dev_t
> >
> On Sat Mar 24 2001 Linus Torvalds (torvalds@transmeta.com) wrote:
> > There is no way in HELL I will ever accept a 64-bit dev_t.
> >
> > I _will_ accept a 32-bit dev_t, with 12 bits for major numbers, and 20
> > bits for minor numbers.
>
> Do you have any interest in doing away with the concept of major and
> minor numbers altogether; turning the dev_t into an opaque unique id?

Inside the kernel we'll eventually do that.

However, outside the kernel you still need the notion of device numbers if
for no other reasons than legacy /dev space (other applications like 'tar'
care too, but they only care about uniqueness, not about much else).

> At the application level, the kinds of information that is derived from
> the major/minor number should probably be derived in some other manner
> such as a library or system call.

It is. It's called "stat()", and a lot of people do depend on a
device number being available. Few people care what that number actually
_is_, though.

So device numbers aren't going away, they are very much part of the UNIX
legacy. We don't need to care about them too much inside the kernel,
though. What most drivers really want to know is "sub-unit number", and
not much else.

Linus