9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "rob pike, esq." <rob@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Ephase question.
Date: Mon, 12 Aug 2002 23:37:51 -0400	[thread overview]
Message-ID: <29e05aa2f218db4017cf95233091743f@plan9.bell-labs.com> (raw)

>   I see. But can you give me any insight into why it was implemented this
>   way. Again, it seems so obvious to use fids for reference counting and it
>   shouldn't be of a significant overhead. Moreover it's entirely up to
>   the FileServer to support this feature -- kernel is not supposed to
>   care. You should've had some reason for not supporting this in all
>   your FileServers.

There was an implementation reason, which I don't remember.  I prefer
this argument:

	When you remove a file, it's removed.

That's the definition of remove, as I understand it.

Unix has a weird property that you can remove files and they're still not
removed until some unfindable process dies.  We used to run out of disk
space because an editor (mine) unlinked its /tmp file so it wouldn't clutter the
disk if it exited prematurely.  If someone edited a big file, /tmp would fill
up but ls /tmp wouldn't tell you anything.  Not to mention what happens
if the kernel crashed with a file in that half-made state.

open(ORCLOSE) is a much cleaner solution to the /tmp problem.

But the real argument is that Unix's semantics are an accident of the way
it implemented its file system.  Plan 9 has different semantics.  Whether
or not it's what you want, it's hard to argue with:

	When you remove a file, it's removed.


-rob



             reply	other threads:[~2002-08-13  3:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-13  3:37 rob pike, esq. [this message]
2002-08-13  9:31 ` Douglas A. Gwyn
  -- strict thread matches above, loose matches on Subject: below --
2002-08-14 14:12 Russ Cox
2002-08-14 13:19 rob pike, esq.
2002-08-15  8:59 ` Douglas A. Gwyn
2002-08-15 16:22   ` Ronald G Minnich
2002-08-13 23:49 rog
2002-08-13 17:28 Russ Cox
2002-08-13 17:01 rob pike, esq.
2002-08-13 16:37 anothy
2002-08-13 15:59 Russ Cox
2002-08-14  8:42 ` Douglas A. Gwyn
2002-08-13 15:57 Russ Cox
2002-08-13 15:43 rob pike, esq.
2002-08-13 13:13 rog
2002-08-13 12:16 presotto
2002-08-13 15:53 ` Ronald G Minnich
2002-08-13 11:43 David Gordon Hogan
2002-08-13 15:45 ` Ronald G Minnich
2002-08-13  6:17 Charles Forsyth
     [not found] <rsc@plan9.bell-labs.com>
2002-08-13  5:42 ` Russ Cox
2002-08-13  5:53   ` Scott Schwartz
2002-08-13  6:05   ` Ronald G Minnich
2002-08-13  6:22     ` Alexander Viro
2002-08-13  6:13   ` Alexander Viro
2002-08-13  4:20 Russ Cox
2002-08-13  3:33 presotto
2002-08-13  4:10 ` Alexander Viro
2002-08-13  5:39 ` Ronald G Minnich
2002-08-19 16:23   ` Boyd Roberts
2002-08-13  6:46 ` Andrew Lynch
2002-08-13 22:07 ` Roman V. Shaposhnick
2002-08-13  3:31 Russ Cox
2002-08-13  1:39 presotto
2002-08-13  3:14 ` Roman V. Shaposhnick
2002-08-13  1:26 Roman V. Shaposhnick

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=29e05aa2f218db4017cf95233091743f@plan9.bell-labs.com \
    --to=rob@plan9.bell-labs.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).