mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andries.Brouwer@cwi.nl
Cc: akpm@digeo.com, linux-kernel@vger.kernel.org, zippel@linux-m68k.org
Subject: Re: [PATCH 1/3] revert register_chrdev_region change
Date: Mon, 24 Mar 2003 20:39:57 +0000	[thread overview]
Message-ID: <20030324203957.A24112@infradead.org> (raw)
In-Reply-To: <UTC200303242034.h2OKYEF21820.aeb@smtp.cwi.nl>; from Andries.Brouwer@cwi.nl on Mon, Mar 24, 2003 at 09:34:14PM +0100

On Mon, Mar 24, 2003 at 09:34:14PM +0100, Andries.Brouwer@cwi.nl wrote:
> A. On kdev_t vs. dev_t:
> kdev_t gives small and fast code, dev_t needs a conditional
> That was my main reason. I suppose you say that dev_t is a cookie
> and that the kernel should never want to ask about major and minor,
> except perhaps at filesystem interfaces. So the 1000+ invocations
> that we have now should all go away. A reasonable point of view.

Yupp.  And you'll notice that we're almost there for block devices
already.

> B. On what is registered:
> The main question here is what the documented outside reality is.
> Is that phrased in terms of dev_t intervals? Or is that phrased
> in terms of (major,minor) pairs?
> Until convinced otherwise I will hold that users talk about
> (major,minor) pairs. They do ls -l and see major,minor pairs.
> They want to do mknod and need a major,minor pair.
> So I suppose that the documented reality will give a minor
> range for a given major, or give a major range.

Well, users can do that if it makes their live easier.  The kernel
doesn't need nor should know about this split internally.  There's
a few legacy interfaces left that hardcode this split, but it's
okay - no one expects the major/minor split to have more meaning
than __low/__high anyway - we already have far too many subsystems
that hand out ranges (or in the case of sound individual dev_t s)
to drivers.

> Of course one can avoid the distinction by decreeing that
> majors 0-255 cannot have more than 256 minors.

It might be a wise idea to not use them to avoid subtile driver
breakage unless we do a full audit, yes.

  reply	other threads:[~2003-03-24 20:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24 20:34 Andries.Brouwer
2003-03-24 20:39 ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-24 22:40 Andries.Brouwer
2003-03-24 22:52 ` Roman Zippel
2003-03-24 22:06 Andries.Brouwer
2003-03-24 22:28 ` Roman Zippel
2003-03-24 19:07 Andries.Brouwer
2003-03-24 19:10 ` Christoph Hellwig
2003-03-24 20:55 ` Roman Zippel
2003-03-23 23:25 Roman Zippel
2003-03-24 14:25 ` Andries Brouwer
2003-03-24 14:43   ` Roman Zippel
2003-03-24 15:04   ` Christoph Hellwig
2003-03-24 16:09     ` Roman Zippel

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=20030324203957.A24112@infradead.org \
    --to=hch@infradead.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.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

all inboxes | Powered by JetHome®