From: "H. Peter Anvin" <hpa@zytor.com>
To: andersen@codepoet.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: On re-working the major/minor system
Date: Fri, 07 Dec 2001 14:04:42 -0800 [thread overview]
Message-ID: <3C113CFA.5090109@zytor.com> (raw)
In-Reply-To: <3C10A057.BD8E1252@evision-ventures.com> <E16CJnv-0005c0-00@the-village.bc.nu> <20011207135100.A17683@codepoet.org> <9urbtm$69e$1@cesium.transmeta.com> <20011207145535.A18152@codepoet.org>
Erik Andersen wrote:
>
> Ok, so we go through, change sys/sysmacros.h, tar.h, cpio.h, and
> any other offending header file. And guess what? Not only has
> nothing changed (since those are macros, not functions), but you
> just broke every older .deb and .rpm in existance on your updated
> system.
>
> In sys/sysmacros.h it defines major() and minor() as macros, so
> just dropping in an updated C library binary isn't going to do
> squat until all of userspace gets recompiled. And tar.h and
> cpio.h define long standing (well over 10 years now) binary
> structures. We can't just go changing this stuff, since now when
> a dev_t is some magic cookie, if I go to install something from
> my old Debian 1.2 CD or my old RedHat 4.0 CD, my system will puke
> trying to install using cookies that in fact are old 8/8 split
> device nodes and not cookies at all.
>
It's clear a painful change is needed. **We don't have a choice.**
However, the fewer places we have to make source code changes the better.
What we agreed upon when this was discussed last year was the following:
dev_t is extended to a 12:20 (32-bit size.) I personally would rather
have seen a 64-bit size (32:32) but was outvoted :(
New major 0 is reserved, except that dev_t == 0 remains the code for "no
device". The unnamed device major becomes major 256.
If (dev_t & ~0xFFFF) == 0, the dev_t is interpreted as an old-format
dev_t, and is interpreted according to the following algorithm:
if ( dev && (dev & ~0xFFFF) == 0 ) {
major = (dev >> 8) ? (dev >> 8) : 256;
minor = dev & 0xFF;
} else {
major = dev >> 20;
minor = dev & 0xFFFFF;
}
-hpa
next prev parent reply other threads:[~2001-12-07 22:05 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-03 18:12 Linux/Pro -- clusters Donald Becker
2001-12-04 1:55 ` Davide Libenzi
2001-12-04 2:09 ` Donald Becker
2001-12-04 2:23 ` Davide Libenzi
2001-12-04 2:34 ` Alexander Viro
2001-12-04 9:10 ` Alan Cox
2001-12-04 9:30 ` Thomas Langås
2001-12-04 9:45 ` Alan Cox
2001-12-04 11:34 ` Thomas Langås
2001-12-05 21:57 ` Linus Torvalds
2001-12-05 23:05 ` Andre Hedrick
2001-12-06 4:31 ` Daniel Phillips
2001-12-05 23:49 ` Alan Cox
2001-12-05 23:48 ` Andre Hedrick
2001-12-06 16:58 ` Linus Torvalds
2001-12-06 18:02 ` Alan Cox
2001-12-06 18:07 ` Linus Torvalds
2001-12-06 18:12 ` Kai Henningsen
2001-12-06 20:46 ` Linus Torvalds
2001-12-06 22:40 ` Alan Cox
2001-12-06 18:33 ` Alan Cox
2001-12-06 18:55 ` Linus Torvalds
2001-12-06 19:19 ` Alan Cox
2001-12-06 20:37 ` Linus Torvalds
2001-12-06 22:35 ` Alan Cox
2001-12-06 22:34 ` Linus Torvalds
2001-12-06 22:58 ` Alexander Viro
2001-12-07 10:14 ` Martin Dalecki
2001-12-07 10:37 ` Alan Cox
2001-12-07 10:56 ` Martin Dalecki
2001-12-07 12:08 ` Alan Cox
2001-12-07 20:51 ` On re-working the major/minor system Erik Andersen
2001-12-07 21:21 ` H. Peter Anvin
2001-12-07 21:55 ` Erik Andersen
2001-12-07 22:04 ` H. Peter Anvin [this message]
2001-12-07 23:07 ` Erik Andersen
2001-12-07 23:12 ` H. Peter Anvin
2001-12-08 11:42 ` Alan Cox
2001-12-08 20:37 ` H. Peter Anvin
2001-12-09 12:06 ` Kai Henningsen
2001-12-09 21:57 ` H. Peter Anvin
2001-12-11 20:45 ` Kai Henningsen
2001-12-06 18:38 ` Linux/Pro -- clusters Doug Ledford
2001-12-04 14:37 ` Daniel Phillips
2001-12-04 15:19 ` Jeff Garzik
2001-12-04 17:16 ` Daniel Phillips
2001-12-04 17:20 ` Jeff Garzik
2001-12-04 18:04 ` Alan Cox
2001-12-04 18:16 ` Daniel Phillips
2001-12-04 20:20 ` Andrew Morton
2001-12-05 13:11 ` Deep look into VFS Martin Dalecki
2001-12-05 15:19 ` Alexander Viro
2001-12-05 15:30 ` Martin Dalecki
-- strict thread matches above, loose matches on Subject: below --
2001-12-08 17:55 On re-working the major/minor system Andries.Brouwer
2001-12-09 21:37 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C113CFA.5090109@zytor.com \
--to=hpa@zytor.com \
--cc=andersen@codepoet.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox