9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Rob Pike" <robpike@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] everything is a directory
Date: Mon, 20 Aug 2007 08:02:58 -0700	[thread overview]
Message-ID: <7359f0490708200802g2ba8abc0jd61b4f9550bc382f@mail.gmail.com> (raw)
In-Reply-To: <46C9A3E8.5A6BE67D@null.net>

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.

Also, I dispute your claim that tools have to change.
For instance, ls will misbehave: it will think your file
is a directory.  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.

It reminds me of symlinks, which I detest. I understand
why they were created - cross-device links didn't work -
but they broke just about everything by introducing a
second kind of file. Half the time you want the file,
half the time you want the file it describes. They're
pointers, and deciding whether the operation wants the
pointer's value or referent means a new system call
shows up, a new flag appears everywhere, and one
usually guesses wrong the first 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.

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

-rob



On 8/20/07, Douglas A. Gwyn <DAGwyn@null.net> wrote:
> I was thinking more about the subject, and extended attributes.
> Here is an alternative proposal to implement extended attributes:
>
> (1) Everything stays the same as it is (Plan 9 or old-Unix)
> except:
> (2) An attempt to read(2) or write(2) a directory will succeed
> if and only if there is a .data entry, in which case it will
> access contents of the .data object.
>
> None of the existing tools need to be changed.
>
> To add attributes (all done in user space):
> (a) Move the current file (terminal node) to a temp name.
> (b) Make a directory in its place, with the original name.
> (c) Move the temp name to original_name/.data .
> (d) Create a file (subdirectory?) .attributes .
> (e) Populate the .attributes .
>


  parent reply	other threads:[~2007-08-20 15:02 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 [this message]
2007-08-21  8:48                       ` Douglas A. Gwyn
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=7359f0490708200802g2ba8abc0jd61b4f9550bc382f@mail.gmail.com \
    --to=robpike@gmail.com \
    --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).