mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gunnar Ritter <Gunnar.Ritter@pluto.uni-freiburg.de>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: William Stearns <wstearns@pobox.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: silent semantic changes in reiser4 (brief attempt to document the idea ofwhat reiser4 wants to do with metafiles and why
Date: Thu, 09 Sep 2004 20:09:22 +0200	[thread overview]
Message-ID: <41409C52.nail3E31PZOBN@pluto.uni-freiburg.de> (raw)
In-Reply-To: <20040909090342.GA30303@thunk.org>

Theodore Ts'o <tytso@mit.edu> wrote:

> Any such scheme will violate POSIX and SUS, since we are stealing from
> the filename namespace,

Not forcibly. POSIX does not give guarantees that everybody can access
existing files with arbitrary names. If there is a metafile in a directory
which can be looked up using the regular pathname hierarchy but requires
certain conditions to be accessed, there is principally nothing wrong
with this. It would likely be wrong if accessing the name for a
non-existent metafile using one of the POSIX interfaces (e.g. creat())
would result in other than one of the defined actions.

> and thus could cause a previously working program to stop working

POSIX holds a barrier against this. It just does not work using the
pathname resolution specification alone. It works by defining certain
actions for certain file type/system interface combinations. For
example, it is demanded that chdir() fails with ENOTDIR if the target
name is not a directory. Thus if the target is a regular file, chdir()
is required to fail.

If, however, the type of the file in question is neither S_IFREG
nor S_IFDIR nor another of the standardized file types, there are
no prescriptions about what system interfaces must do on them.
POSIX (IEEE Std 1003.1, 2004 Edition) explicitly allows to support
non-standard file types in its Base Definitions, 3. 'Definitions',
3.163 'File'.

Also (Base Definitions, 2.1 'Implementation Conformance', 2.1.1
'Requirements'):

# 4. The system may provide additional utilities, functions, or facilities
#    not required by IEEE Std 1003.1-2001. Non-standard extensions of the
#    utilities, functions, or facilities specified in IEEE Std 1003.1-2001
#    should be identified as such in the system documentation. Non-standard
#    extensions, when used, may change the behavior of utilities, functions,
#    or facilities defined by IEEE Std 1003.1-2001. The conformance document
#    shall define an environment in which an application can be run with the
#    behavior specified by IEEE Std 1003.1-2001. In no case shall such an
#    environment require modification of a Strictly Conforming POSIX
#    Application (see Strictly Conforming POSIX Application ).

For example, Unix domain sockets were not part of POSIX until 2001,
but none of the existing systems violated POSIX by refusing to open()
them.

I'm not sure about the results of pathname lookup using the names of
such implementation-defined file types with slashes attached, but it
would probably be worth to file an interpretation request for this
once there is sufficient demand to support it in Linux.

> --- however, assuming that we don't care about
> this, the virtical bar is the least likely to collide with existing
> file usages, because of its status as a shell meta-character (i.e.,
> pipe).  This means that in order to use it on the shell command line,
> programs will have to quote it:
>
> 	cat /home/tytso/word.doc/\|/meta/silly-stupid-metadata-or-named-stream

POSIX certainly requires this to fail with ENOTDIR if 'word.doc' is
S_IFREG, but if it is something like S_IFSTR, there might be a realistic
chance to have it as an implementation extension without violating POSIX.

	Gunnar

-- 
http://omnibus.ruf.uni-freiburg.de/~gritter

  parent reply	other threads:[~2004-09-09 18:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29 20:21 silent semantic changes in reiser4 (brief attempt to document the idea of what " Hans Reiser
2004-08-31 13:12 ` Pavel Machek
2004-08-31 13:36   ` Christian Mayrhuber
2004-09-07 20:16   ` Hans Reiser
2004-09-07 20:59     ` Pavel Machek
2004-09-08  9:14       ` Romano Giannetti
2004-09-07 21:05     ` William Stearns
2004-09-07 22:09       ` Robin Rosenberg
2004-09-09  9:03         ` silent semantic changes in reiser4 (brief attempt to document the idea ofwhat " Theodore Ts'o
2004-09-09 17:23           ` William Lee Irwin III
2004-09-09 18:09           ` Gunnar Ritter [this message]
2004-09-09 19:15           ` Hans Reiser
2004-09-09 20:45             ` Paul Jakma
2004-09-10  0:57               ` Hans Reiser
2004-09-10  1:15                 ` Paul Jakma
2004-09-10  5:04                   ` Hans Reiser
2004-09-10  5:53                     ` viro
2004-09-10  6:52                       ` Hans Reiser
2004-09-10  7:05                         ` viro
2004-09-10  7:30                           ` Hans Reiser
2004-09-10 16:49                             ` Lee Revell
2004-09-10 17:23                               ` viro
2004-09-10  7:21                       ` Hans Reiser
2004-09-10  7:33                         ` viro
2004-09-10  7:46                           ` Hans Reiser
2004-09-10  8:18                             ` viro
2004-09-10  9:20                     ` Alan Cox
2004-09-10 17:48                       ` Hans Reiser
2004-09-10 17:07                         ` Alan Cox
2004-09-10 13:08                     ` Horst von Brand
2004-09-10  3:22                 ` Horst von Brand
2004-09-12 20:43             ` Davide Inglima
2004-09-10  9:42           ` Helge Hafting
2004-09-10 17:42             ` Horst von Brand
     [not found]             ` <20040910201738.GB8698@eskimo.com>
2004-09-14  8:39               ` Helge Hafting
2004-08-31 14:09 ` silent semantic changes in reiser4 (brief attempt to document the idea of what " Mike Waychison
2004-08-31 17:55 ` V13
2004-08-31 18:17   ` Spam
2004-08-31 19:08     ` Tonnerre
2004-08-31 19:38       ` Spam
2004-09-01  3:11         ` Robin Rosenberg
2004-08-31 19:35     ` V13
     [not found]       ` <874qmjm51g.fsf@uhoreg.ca>
2004-08-31 20:31         ` Spam
     [not found]           ` <87vfezkm06.fsf@uhoreg.ca>
2004-08-31 22:15             ` Spam
2004-08-31 19:49   ` Chris Dawes
2004-09-01  6:03   ` Hans Reiser

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=41409C52.nail3E31PZOBN@pluto.uni-freiburg.de \
    --to=gunnar.ritter@pluto.uni-freiburg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.com \
    --cc=tytso@mit.edu \
    --cc=wstearns@pobox.com \
    /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

Powered by JetHome