mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Emmanuel Colbus <ecolbus@manux.info>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][5/11][MANUX] Kernel compatibility : major/minor numbers
Date: Tue, 15 Apr 2014 16:40:29 +0100	[thread overview]
Message-ID: <20140415164029.69196976@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <534D5119.8050701@manux.info>

> Why is it? I mean, as far as userspace is concerned, they do have a
> unique identifier : their name. How would it be problematic that the

No - a name is never a unique identifier in a Unix system. The
fundamental object is the file handle. If I want to be able to answer the
question

"are these two file handles pointing to the same device"

I need the major/minor to do so. Even if I know the name I don't know if
two opens of the same name produced references to the same object,
because another process may have changed it under me.

Most code doesn't care. You can happily replace /dev/null with something
else (or accidentally make it a file and then a year later wonder why
your disk is full).

Names are very much second class citizens. An object can have a file
handle without a name, or with many names

Alan

  reply	other threads:[~2014-04-15 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 13:42 Emmanuel Colbus
2014-04-15 15:02 ` Austin S Hemmelgarn
2014-04-15 17:39   ` Emmanuel Colbus
2014-04-15 15:06 ` One Thousand Gnomes
2014-04-15 15:32   ` Emmanuel Colbus
2014-04-15 15:40     ` One Thousand Gnomes [this message]
2014-04-15 20:19     ` Theodore Ts'o
2014-04-15 20:58       ` Emmanuel Colbus

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=20140415164029.69196976@alan.etchedpixels.co.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=ecolbus@manux.info \
    --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

all inboxes | Powered by JetHome®