Re: [PATCH] print_dev_t for 2.6.0-test1-mm

Andries Brouwer
2003-07-17T11:31:58Z

On Thu, Jul 17, 2003 at 02:24:44AM -0700, Andrew Morton wrote:

> And surely the task of mangling whatever comes off the wire into a dev_t for
> init_special_inode() should be private to the Linux NFS client?
>
> Still wondering why we need to support a 16:16 encoding in [k]dev_t.

I think I answered this already in earlier posts today. Again:
(i) We need support for 16/32/64-bit dev_t.
(ii) User space (glibc) has 64-bit dev_t.
(iii) The split into major/minor is hardwired in <sys/sysmacros.h>,
independent of filesystem. Thus, we must define major(),minor(),makedev().
(iv) For Linux the device number is a cookie - major and minor do not
really have a significance - we just select a driver given a *dev_t
interval. That means that there are no reasons for inventing more
complicated setups like 12:20.

And since you add "[k]": a kdev_t is internal to the kernel,
we do whatever we want. I wanted a pointer (say, to a struct gendisk or so),
but these days it seems we are heading for an arithmetic type, with 32:32.

Andries