9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <DAGwyn@null.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] everything is a directory
Date: Tue, 21 Aug 2007 08:48:36 +0000	[thread overview]
Message-ID: <mcGdne_uqrld2lfbnZ2dnUVZ_uqvnZ2d@comcast.com> (raw)
In-Reply-To: <7359f0490708200802g2ba8abc0jd61b4f9550bc382f@mail.gmail.com>

"Rob Pike" <robpike@gmail.com> wrote in message 
news:7359f0490708200802g2ba8abc0jd61b4f9550bc382f@mail.gmail.com...
> This is only possible because someone said it was OK to
> break directories in the first place.  Not too long ago, if you
> wanted to read a directory you could use a read system call.
> I see no functional reason that that symmetry was worth
> breaking.

That was already changed long before "extended attributes"
entered the picture.  On modern Unix systems (since NFS
or slightly before) and even on Plan 9 one doesn't normally
read and parse actual directory content; the OS/library has
a different interface for directory interrogation.

> Also, I dispute your claim that tools [don't] have to change.
> For instance, ls will misbehave: it will think your file
> is a directory.

But under my proposal that is correct.  An attributed file
*is* an ordinary directory (with ordinary files and/or other
directories as members).  But if you "cat" or "grep" the file
name, you access its .data member.  Since these days the
actual directory content isn't meaningfully accessed, that frees
it up for some other interpretation, such as what I proposed.
(You can also access the file data as path/name/.data, so
there is nothing misleading about this use of the existing
filesystem structure.)

(An implementation detail I didn't mention: I recommend
that the .data member always be the first entry for speed
of access, thus no "." or ".." entries [unlike Solaris-10
extended attributes]; those should be handled by the OS
path interpreter, as on Plan 9.)

>  And there will be lots more instances
> because, fundamentally, stat will be misleading.
> Then all the existing tools will be changed because
> people will want to use them on attributed files and
> their attributes.

There is no reason why "attribute aware" tools shouldn't
be developed, if attributes are indeed useful (something
I'm not yet convinced of).  My purpose was to figure
out a way of implementating extended file attributes with
minimal disruption to the usual Unix/Plan 9 file model.
Note that the Linux/Solaris-10 (Posix?) implementation
requires separate system calls and extensive changes to
standard tools *and* to the way those tools are invoked.

> It reminds me of symlinks, which I detest. ...

Yes, the analogy is close.

> but they broke just about everything by introducing a
> second kind of file. ...

Which is what we want to avoid this time.

> Attributes, as created or as posited here, are better
> only because for the most part one can ignore them
> altogether. Except when you can't.

Unfortunately, if you forget about attributes on Linux/
Solaris-10, you far too easily do what users would
definitely consider to be "the wrong thing".  That's
*why* so many standard tools had to be modified
using their approach to extended attributes.

> If you want attributes, rethink the system, don't hack
> it.

So what is a better proposal?


  reply	other threads:[~2007-08-21  8:48 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16  9:30 jsnx
2007-08-16 10:42 ` maht
2007-08-16 11:47   ` Charles Forsyth
2007-08-17  8:41   ` [9fans] " jsnx
2007-08-16 12:39 ` [9fans] " Francisco J Ballesteros
2007-08-16 14:01 ` David Leimbach
2007-08-16 14:39   ` erik quanstrom
2007-08-16 15:58   ` maht
2007-08-16 17:45     ` David Leimbach
2007-08-16 19:01       ` ron minnich
2007-08-16 19:37         ` Robert Sherwood
2007-08-16 20:49           ` David Leimbach
2007-08-17  8:42             ` Douglas A. Gwyn
2007-08-17 13:00               ` ron minnich
2007-08-17 13:24                 ` erik quanstrom
2007-08-17 13:35                   ` plan9
2007-08-17 14:22                     ` ron minnich
2007-08-17 14:29                       ` David Leimbach
2007-08-17 14:29                         ` Richard Miller
2007-08-17 14:49                         ` ron minnich
2007-08-17 17:49                           ` David Leimbach
2007-08-17 18:09                             ` Charles Forsyth
2007-08-20  8:48                   ` Douglas A. Gwyn
2007-08-20  8:48                 ` Douglas A. Gwyn
2007-08-20 14:29                   ` Douglas A. Gwyn
2007-08-20 14:53                     ` Francisco J Ballesteros
2007-08-20 15:02                     ` Rob Pike
2007-08-21  8:48                       ` Douglas A. Gwyn [this message]
2007-08-21  8:47                     ` [9fans] " jsnx
2007-08-21  8:47                 ` jsnx
2007-08-23  8:50                   ` Douglas A. Gwyn
2007-08-24  8:39                 ` jsnx
2007-08-29  9:06                   ` Douglas A. Gwyn
2007-08-30  8:35                 ` jsnx
2007-08-30 13:18                   ` David Leimbach
2007-08-31  9:07                     ` Douglas A. Gwyn
2007-08-31 18:04                       ` Joel C. Salomon
2007-09-01 12:07                         ` Uriel
2007-09-02  1:11                           ` Joel C. Salomon
2007-09-02  2:14                             ` erik quanstrom
2007-09-02  5:01                               ` Anthony Martin
2007-09-02 13:00                             ` Uriel
2007-09-02 16:53                               ` Joel C. Salomon
2007-09-03  7:50                                 ` Uriel
2007-09-03 16:40                                   ` Joel C. Salomon
2007-09-03 19:51                                     ` Uriel
2007-09-09 21:41                                   ` roger peppe
2007-09-03  9:27                             ` Douglas A. Gwyn
2007-09-03 11:03                               ` Charles Forsyth
2007-08-17 14:27               ` [9fans] " David Leimbach
2007-08-17  4:11           ` Skip Tavakkolian
2007-08-17  8:42     ` [9fans] " jsnx
2007-08-17 13:25       ` erik quanstrom
2007-08-17  0:39   ` [9fans] " Uriel
2007-08-17  8:59     ` matt
2007-08-17 12:05       ` erik quanstrom
2007-08-20  8:47       ` [9fans] " jsnx
2007-08-20  9:00         ` Francisco J Ballesteros
2007-08-20 11:34           ` Tom Lieber
2007-08-20 11:40             ` erik quanstrom
2007-08-20 13:33               ` Uriel
2007-08-20 17:36             ` Paweł Lasek
2007-08-20 18:26               ` erik quanstrom
2007-08-20 18:48                 ` Paweł Lasek
2007-08-20 19:52               ` Dave Eckhardt
2007-08-20 21:28                 ` Robert William Fuller
2007-08-20 21:40                   ` erik quanstrom
2007-08-20 22:05                     ` Robert William Fuller
2007-08-21 11:29                       ` Brantley Coile
2007-08-21 17:54                       ` Robert Raschke
2007-08-22  7:38                         ` andrey mirtchovski
2007-08-20 22:12                     ` David Leimbach
2007-08-21  0:37                       ` dave.l
2007-08-21  1:14                         ` David Leimbach
2007-08-21  1:25                           ` Uriel
2007-08-21  1:44                             ` David Leimbach
2007-08-21  8:48                             ` app
2007-08-22  8:47                             ` jsnx
2007-08-22  9:54                             ` app
2007-08-22 11:22                               ` roger peppe
2007-08-22 11:30                               ` erik quanstrom
2007-08-23  8:49                             ` jsnx
2007-08-21  1:26                         ` Roman Shaposhnick
2007-08-21  1:28                           ` Uriel
2007-08-22  8:47                     ` jsnx
2007-08-20 21:57                   ` Uriel
2007-08-20 22:08                     ` Robert William Fuller
2007-08-21  8:48             ` jsnx
2007-08-20 11:17         ` erik quanstrom
2007-08-20 17:40         ` Roman Shaposhnick
2007-08-20 17:52           ` Uriel
2007-08-23  8:49           ` jsnx
2007-08-23 10:35             ` Steve Simon
2007-08-24  8:40             ` jsnx
2007-08-24  8:57               ` Martin Neubauer
2007-08-24 10:55               ` David Leimbach
2007-09-06  4:06                 ` Roman Shaposhnik
2007-08-29  9:06               ` jsnx
2007-08-30  1:41                 ` Uriel
2007-09-06  5:06                 ` Roman Shaposhnik
2007-08-29  9:06             ` jsnx
2007-08-23 15:29           ` Douglas A. Gwyn
2007-08-21  8:48         ` jsnx
2007-08-21 11:22           ` Uriel
2007-08-21 15:05           ` Skip Tavakkolian
2007-08-20  8:48     ` [9fans] " Douglas A. Gwyn
2007-08-17  8:42 ` [9fans] " jsnx

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=mcGdne_uqrld2lfbnZ2dnUVZ_uqvnZ2d@comcast.com \
    --to=dagwyn@null.net \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).