The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Rob Pike <robpike@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: TUHS main list <tuhs@minnie.tuhs.org>,
	Noel Chiappa <jnc@mercury.lcs.mit.edu>
Subject: Re: [TUHS] moving directories in svr2
Date: Fri, 31 Dec 2021 16:55:34 +1100	[thread overview]
Message-ID: <CAKzdPgxPXUjEQKkogfhR5RA5SjC+HG2h5--BNUSQwZ0XQUJ==Q@mail.gmail.com> (raw)
In-Reply-To: <Yc6SFRbK1aCuxJOr@mit.edu>

[-- Attachment #1: Type: text/plain, Size: 4153 bytes --]

Thanks for your thoughtful response (and for reading the paper).

This for me is the catch:

*But there is a whole ecosystem of shell scripts, programs, user's finger
macros, etc., that would break if we "made things better" or made things
simpler.*

And of course you're right, but we've known how to roll out breaking
changes in software for a very long time now. And we do so often. Few Unix
programs from the past would compile and run today without being updated to
"modern" interfaces and compilers.

I believe it could be done, and I believe it should be done. Rolled out
carefully and explained well it would please far more than it offends, and
is arguably far closer to correct than the current situation.

Of course, I am not volunteering, sorry. Easy for me to snipe, I admit, but
then I paid my OS dues long ago.

-rob


On Fri, Dec 31, 2021 at 4:16 PM Theodore Ts'o <tytso@mit.edu> wrote:

> On Fri, Dec 31, 2021 at 02:23:15PM +1100, Rob Pike wrote:
> > In broad strokes, that's exactly what we did in Plan 9, with great
> results,
> > as was said here a while back. The paper ended with a plea to do the same
> > to Unix, which I think is quite doable.
> >
> > https://9p.io/sys/doc/lexnames.html
>
> I'm sure it *could* be done.  In fact, Linux has a number of the
> pieces of the implementations already, which could be reused for a
> Plan-9-style lexical namespace.  Linux has bind mounts, and a dentry is
> essentially a cached directory lookup (it contains a pointer to its
> parent dentry, the filename used to do the lookup and a pointer to the
> resulting inode).  And a struct file contains a struct dentry, which
> means in Linux it is possible to determine the path used to open a
> particular file.  There are some differences of course; so it's not
> exact, but I agree with you that it is quite "doable".  (In
> particular, how Linux dentries and symlinks interact appears to be
> different from how Plan 9 and Channels did things, if I understand the
> paper correctly.)
>
> The question though, is whether Linux *should* do it.  Or rather,
> *could* we do it without breaking backwards compatibility with users
> and application which expect that dot-dot works the way it does in
> classical Unix implementations for the past 4 decades or so.
>
> Granted that the combination of symlinks, and hard links, and in
> Linux, bind mounts (not to mention bind namespaces, chroots, and
> pivot_root operations), can be confusing.  But there is a whole
> ecosystem of shell scripts, programs, user's finger macros, etc., that
> would break if we "made things better" or "made things simpler".
>
> One of the benefits of research OS's is that you can experiment with
> things without having to worry about the howls of angry users when you
> break backwards compatibility, or eliminate some particular awkward
> API or feature.
>
>                                            - Ted
>
> P.S.  For example, how I wish I could eliminate telldir/seekdir, or at
> least change things so that telldir/seekdir used a substantially
> larger "cookie" to memoize a position in a directory's readdir stream
> which has to be valid effectively forever.  Today, you can pass a
> 32-bit telldir cookie to seekdir, and readdir MUST not return a
> directory entry that it had already returned, and MUST not skip a
> directory entry that was present at the time of the telldir().  Thus
> spake POSIX, and there are applications which depend on
> telldir/seekdir/readdir having this precise set of semantics
>
> If your directory is stored internally as a linear stream, that's not
> too bad; but if you're using a more complex data structure, life gets
> interesting.  I know of one file system (JFS) which added an extra,
> separate, on-disk b-tree structure to each directory just to be able
> to provide stable telldir/seekdir cookies.  (And of course, there's a
> performance impact to needing to update an extra b-tree each time a
> directory entry is added or removed.)
>
> With a research OS, it's at least possible to say, "Well, *that* was a
> mistake; let's pretend it never happened and let's see how much better
> life would be."  :-)
>

[-- Attachment #2: Type: text/html, Size: 5038 bytes --]

  parent reply	other threads:[~2021-12-31  5:56 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  3:45 Noel Chiappa
2021-12-30  4:02 ` Bakul Shah
2021-12-30 16:40 ` Theodore Ts'o
2021-12-30 22:31   ` Dan Cross
2021-12-31  0:43     ` Bakul Shah
2021-12-31  1:00       ` Rob Pike
2021-12-31  1:45         ` Bakul Shah
2021-12-31  2:23           ` Adam Thornton
2021-12-31 18:56       ` Chet Ramey
2021-12-31  3:08     ` Theodore Ts'o
2021-12-31  3:23       ` Rob Pike
2021-12-31  5:16         ` Theodore Ts'o
2021-12-31  5:21           ` Dan Cross
2021-12-31  5:55           ` Rob Pike [this message]
2021-12-31 13:32             ` Michael Kjörling
2021-12-31 15:53               ` Adam Thornton
2021-12-31 16:13                 ` Arthur Krewat
2021-12-31 18:17                 ` Dan Cross
2021-12-31 18:23                   ` Larry McVoy
2021-12-31 18:37                     ` Dan Cross
2021-12-31 18:29                   ` Arthur Krewat
2022-01-01  0:09                   ` Theodore Ts'o
2022-01-03 13:35                     ` Dan Cross
2022-01-03 20:23                       ` Theodore Ts'o
2022-01-03 20:45                         ` Warner Losh
2022-01-03 21:15                         ` Dan Cross
2022-01-03 22:26                           ` Theodore Ts'o
2022-01-03 23:10                             ` Dan Cross
2022-01-04 15:45                             ` Chet Ramey
2022-01-09 19:28                             ` Larry McVoy
2022-01-03 23:21                           ` Doug McIntyre
2022-01-03 23:37                             ` Adam Thornton
2022-01-04 14:49                               ` Stuart Remphrey
2022-01-03 23:44                             ` Larry McVoy
2022-01-03 23:56                               ` [TUHS] SMP: BSD vs System V (once was: moving directories in svr2) Greg 'groggy' Lehey
2022-01-07 19:01                                 ` Warner Losh
2022-01-09 17:31                                 ` Stuart Remphrey
2022-01-13  2:35                                 ` Kevin Bowling
2022-01-03 23:56                               ` [TUHS] moving directories in svr2 Warner Losh
2022-01-04  2:28                               ` Theodore Ts'o
2022-01-04  2:42                                 ` Larry McVoy
2022-01-04  9:28                                 ` [TUHS] Mythical Distress Sale (was Re: moving directories in svr2) Rob Gingell
2022-01-04 15:17                                   ` Larry McVoy
2022-01-04 15:26                                     ` arnold
2022-01-04 15:40                                       ` Larry McVoy
2022-01-04 15:48                                         ` Richard Salz
2022-01-03 22:57                         ` [TUHS] moving directories in svr2 Phil Budne
2022-01-04 15:40                         ` [TUHS] VRFs (was Re: moving directories in svr2) Derek Fawcus
2021-12-31  5:12       ` [TUHS] moving directories in svr2 Bakul Shah
  -- strict thread matches above, loose matches on Subject: below --
2021-12-29 19:33 Noel Chiappa
2021-12-30  3:40 ` Jay Logue via TUHS
2021-12-29 19:13 Douglas McIlroy
2021-12-29 19:37 ` Dan Cross
2021-12-29 20:15   ` Dan Cross
2021-12-29 20:42     ` Richard Salz
2021-12-29 20:58       ` Dan Cross
2021-12-29 21:20         ` Clem Cole
2021-12-30  3:15       ` Bakul Shah
2021-12-29 17:12 Douglas McIlroy
2021-12-29 16:59 Bakul Shah
2021-12-29 17:04 ` Clem Cole
2021-12-29 17:14 ` arnold
2021-12-29 17:38   ` Clem Cole
2021-12-29 17:49     ` Brantley Coile
2021-12-29 18:27       ` ron minnich
2021-12-29 20:59         ` Rob Pike
2021-12-29 14:33 Will Senn
2021-12-29 15:02 ` arnold
2021-12-29 15:38   ` Will Senn
2021-12-29 15:44     ` Richard Salz
2021-12-29 16:17       ` Clem Cole
2021-12-29 16:58         ` Richard Salz
2021-12-30  5:14         ` Dan Stromberg
2021-12-30 16:22           ` Clem Cole
2021-12-30 18:02           ` John Cowan
2021-12-30 23:04             ` Richard Salz
2021-12-29 15:17 ` Clem Cole
2021-12-29 15:44   ` Will Senn
2021-12-29 16:10     ` Clem Cole
2021-12-29 16:33       ` Warner Losh
2021-12-29 16:01   ` Bakul Shah

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='CAKzdPgxPXUjEQKkogfhR5RA5SjC+HG2h5--BNUSQwZ0XQUJ==Q@mail.gmail.com' \
    --to=robpike@gmail.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --cc=tuhs@minnie.tuhs.org \
    --cc=tytso@mit.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).