Re: [PATCH] new system call mknod64

Linus Torvalds
2003-04-21T18:33:11Z

On Mon, 21 Apr 2003, Christoph Hellwig wrote:
>
> 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.

Yes, we could make dev_t's internally be always 32+32, and do the
marshalling at stat() time. That would actually be my preferred approach,
and would solve some of the problems with using "dev_t" as an opaque type
right now (ie it would solve the "discontiguous region" issue.

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

We HAVE to do the mapping somewhere. Old applications only use the lower
16 bits, and that's just something that MUST NOT be broken.

The question is only _where_ (not whether) we do the mapping. Right now we
keep "dev_t" in teh same format as we give back to user space, and thus we
always map into that format internally. But we don't have to: we can have
an internal format that is different from the one we show users.

Linus