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

From: Andries Brouwer (aebr@win.tue.nl)
Date: Thu Jul 17 2003 - 05:26:00 EST


On Wed, Jul 16, 2003 at 04:49:17PM -0700, Andrew Morton wrote:
> Andries Brouwer <aebr@win.tue.nl> wrote:
>
> > > Why would anyone hand the kernel a 32-bit device number?
> > > They're either 16 or 64, are they not?
> >
> > The kernel has no control over what userspace comes with.
> > And here userspace includes filesystems.
> > Not all filesystems know how to come with 64 bits.
>
> What does "comes with" mean?
>
> Please describe a scenario in which a filesystem which works on current
> kernels will, in a 64-bit-dev_t kernel, call init_special_inode() with a
> 16:16 encoded device number.

:-) You change the subject.
There are many filesystems that only have room for 32 bits.
For example, NFSv2 has "unsigned int rdev".
So, the kernel must be able to handle 32-bit device numbers.

Now about the encoding - nobody knows. This NFS filesystem was mounted
from a FreeBSD system. It is encoded 16+8+8 with the middle 8 the major.
Or, no, it was Solaris or Irix. Encoded 14+18. Etc.

In the case of NFSv2 there is an unknown system on the other side.
Internally for Linux we have not yet used larger device numbers
so there are no cases of 16+16 yet. But there will be occasions
where we have to store a device number in 32 bits, and what I am
saying is that life is easiest if we use 16+16 in such cases.

Andries

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



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:28 EST