9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Another namespace question
@ 2003-03-03 17:41 Keith Nash
  2003-03-03 18:10 ` Russ Cox
  2003-03-03 18:14 ` David Presotto
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Nash @ 2003-03-03 17:41 UTC (permalink / raw)
  To: 9fans

This is a question about why namespaces were designed in the way that they were.

The command
bind path1 path2
where both path1 and path2 are directories, makes path2 a union directory consisting of path1 alone.  So far, so good.

Why was it decided that this command also does the following:
(a) any union directory previously bound to path2 is automatically unmounted, and is found to have disappeared if the new union directory at path2 is unmounted (this is not the case for Lunix mount); *but*...
(b) ...any union directory previously bound to a subdirectory of path2 is not unmounted.

A possible reason for (a) is to clean up the namespace by removing binds that are invisible; but then why (b)?

Keith.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Another namespace question
  2003-03-03 17:41 [9fans] Another namespace question Keith Nash
@ 2003-03-03 18:10 ` Russ Cox
  2003-03-03 18:14 ` David Presotto
  1 sibling, 0 replies; 3+ messages in thread
From: Russ Cox @ 2003-03-03 18:10 UTC (permalink / raw)
  To: 9fans

It's an optimization that caught the common case,
which is mounting something new on /n/foo and
never looking back.  You're probably right that the
implicit unmount is more of a bug than a feature.

Russ



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Another namespace question
  2003-03-03 17:41 [9fans] Another namespace question Keith Nash
  2003-03-03 18:10 ` Russ Cox
@ 2003-03-03 18:14 ` David Presotto
  1 sibling, 0 replies; 3+ messages in thread
From: David Presotto @ 2003-03-03 18:14 UTC (permalink / raw)
  To: 9fans

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

The easy answer is that it was easier to implement.  The per-process
mount table knows nothing about the hierarchical structure of
the bindings.  When you bind something, it is to a file, not to a
path.  If you later bind to something higher in the tree, we
don't know enough to change the lower binding.

I do think that (b) is confusing.

[-- Attachment #2: Type: message/rfc822, Size: 1880 bytes --]

From: Keith Nash <kjn9@citizenearth.com>
To: 9fans@cse.psu.edu
Subject: [9fans] Another namespace question
Date: 3 Mar 2003 17:41:33 -0000
Message-ID: <20030303174133.15491.qmail@mail.dirac.net>

This is a question about why namespaces were designed in the way that they were.

The command
bind path1 path2
where both path1 and path2 are directories, makes path2 a union directory consisting of path1 alone.  So far, so good.

Why was it decided that this command also does the following:
(a) any union directory previously bound to path2 is automatically unmounted, and is found to have disappeared if the new union directory at path2 is unmounted (this is not the case for Lunix mount); *but*...
(b) ...any union directory previously bound to a subdirectory of path2 is not unmounted.

A possible reason for (a) is to clean up the namespace by removing binds that are invisible; but then why (b)?

Keith.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-03 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-03 17:41 [9fans] Another namespace question Keith Nash
2003-03-03 18:10 ` Russ Cox
2003-03-03 18:14 ` David Presotto

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).