Re: [PATCH] new system call mknod64

Christoph Hellwig
2003-04-21T18:23:46Z

On Mon, Apr 21, 2003 at 11:22:51AM -0700, Linus Torvalds wrote:
> Actually, we still do it for both block _and_ character devices.
>
> Look at "nfs*xdr.c" to see what's up.

Just think s/major/dev_lo/g and s/minor/dev_hi/g. This is the
represantation for a legacy protocol. Just because fat thinks
of a filename as 8+3 Linux filenames don't have to be that format.

> The fact that the kernel internally has generalized it away doesn't
> matter. Any kernel virtualization of the number still _has_ to account for
> the fact that it's a real thing.
>
> Put another way:
>
> 0x0000000000000101
>
> _has_ to open the same file as
>
> 0x0000000100000001
>
> because otherwise the kernel virtualization is broken (since they will
> look the same to a user, and they will end up being written to disk the
> same way).

Umm, no. You're far to major/minor biased to realized live get a lot
sipler for use if we don't do any complicated mapping of old dev_t
to the larger dev_t. With the proper ranges we can just map it
numerically 1:1 to the new dev_t. Yes, that means it's all in one
new "major". But who cares?