From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin C.Atkins To: 9fans@cse.psu.edu Subject: Re: [9fans] A proposal regarding # in bind Message-Id: <20030226104243.78c60939.martin@mca-ltd.com> In-Reply-To: <200302251649.h1PGnxM09056@augusta.math.psu.edu> References: <200302251649.h1PGnxM09056@augusta.math.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Wed, 26 Feb 2003 10:42:43 +0530 Topicbox-Message-UUID: 72ccd2b0-eacb-11e9-9e20-41e7f4b1d025 On Tue, 25 Feb 2003 11:49:59 -0500 Dan Cross wrote: > > > Newns should only work if /proto is mounted, right? Just like it shouldn't work > > > after a pctl(NODEVS). Or is newns more powerful than I had appreciated? > > > > [RFCNAMEG not RFNAMEG] > > > > Newns builds a new name space from scratch. The implementation > > is in /sys/src/libauth/newns.c. Right. I forgot about RFCNAMEG, and assumed that it just read /prog/pid/ns and unmounted it found there! But... > > Once newns opens the file describing the name space it is > > to construct, it clears the name space with rfork(RFCNAMEG) > > and then starts rebuilding. If rfork(RFCNAMEG) doesn't clear > > /ur, then /ur is still a special case. If it does clear /ur, then > > how do you get it back? > > Hmm. I wonder if one can post a file descriptor for a kernel > device under /ur ala what srv does. Then, newns() could simply > open that file descriptor, clear the namespace, and then mount > it. That's not shockingly different from what we do now. This sounds neat to me. It's not really a special case any more, just the application of a general mechanism. (I don't like special cases either! :-) > Similarly, the bootstrapping case could be handled by having the > kernel pass init() an open file descriptor, which it could mount > on /ur. I'm not so concerned about being able to remount it in > a process (or descendent thereof) that's unmounted it, so I see > little difference between ``bigur'' and ``smallur''. If you > want /proc, mount it. If you want #|, mount it somewhere, then > do your unmount. Environment's might be a little wierd to deal > with, though. Agreed! That was exactly my point of view too - I only suggested smallur to show that there are several possible approaches. > > - Dan C. > Re: /ur introducing more special cases than it removes: I believe that most of the new special cases are to continue the support for the old '#' syntax. During the transition period, there would of course be more complications, since both the old and the new syntaxes have to work simultaneously! However, once backwards compatibility for '#' could be removed completely, then using Dan's suggestion, I would have thought the '/ur' approach would be gloriously free of special cases (except perhaps, the fact that init is spawned with an open file descriptor). Anyway, the whole thing was just a suggestion/idea/question, and the discussion has been educational for me, at least. (It sure beats spam and "how do we avoid spam" messages, however important the later might be! :-) Martin -- Martin C. Atkins martin@mca-ltd.com Mission Critical Applications Ltd, U.K. http://www.mca-ltd.com