9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Roman Shaposhnik <rvs@sun.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] mv on directory
Date: Sat,  1 Nov 2008 14:25:44 -0700	[thread overview]
Message-ID: <E161FE11-2EB3-4893-B814-E6C5942F106F@sun.com> (raw)
In-Reply-To: <785E9BE8-7F20-418B-9DA3-4BC46A3A98B0@utopian.net>

On Nov 1, 2008, at 9:30 AM, Josh Wood wrote:
> All that said, it's not like I've never cursed a directory that
> wouldn't mv for me in Plan 9 -- so if someone had an answer for
> Rob's question: "What should mv do to a tree that resides on
> multiple file servers?", it could be interesting to discuss. I don't
> think arguing from rm -r is a good tact, though, because of the
> differing risk levels between a failed delete and a failed move. One
> might afford convenience in the former, and eschew it in the latter.

That's a very good point. UNIX in general does guarantee certain
things about rename of the
subdirectories within the same FS, but the price they pay in the
kernel and elsewhere
(NFS being the prime example) seems just too high (the original
explanation given by a
friend of mine who wrote this was much more colorful, but I guess guys
like IBM & co. cleaned up
kernel comments quite a bit ;-)):
    http://lxr.linux.no/linux+v2.6.27.4/fs/namei.c#L2479

The behavior of mv(1) as defined by POSIX seems to build on top of the
rename-within-the-same-FS
guarantee, which, in case of Plan9 is not applicable. Thus it would be
an interesting thought
exercise to go over the POSIX text:
     http://www.opengroup.org/onlinepubs/009695399/
and see how much of the required subdirectory move semantics could be
preserved even though
we lack one of the basic building blocks that makes it behave like it
does on UNIX.

Thanks,
Roman.



  reply	other threads:[~2008-11-01 21:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01 16:30 Josh Wood
2008-11-01 21:25 ` Roman Shaposhnik [this message]
     [not found] <mailman.1.1225540801.26550.9fans@9fans.net>
2008-11-01 13:48 ` Josh Wood
2008-11-01 14:17   ` Rudolf Sykora
2008-11-01 15:04     ` Eric Van Hensbergen
2008-11-01 21:05       ` Roman Shaposhnik
2008-11-02  2:12         ` Eric Van Hensbergen
2008-11-03  3:02           ` Roman Shaposhnik
  -- strict thread matches above, loose matches on Subject: below --
2008-10-31 20:15 Rudolf Sykora

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=E161FE11-2EB3-4893-B814-E6C5942F106F@sun.com \
    --to=rvs@sun.com \
    --cc=9fans@9fans.net \
    /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).