From owner-freebsd-arch Tue May 21 14:45:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id C0F4137B410; Tue, 21 May 2002 14:45:18 -0700 (PDT) Received: from pool0213.cvx22-bradley.dialup.earthlink.net ([209.179.198.213] helo=mindspring.com) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 17AHRV-0000u7-00; Tue, 21 May 2002 14:45:18 -0700 Message-ID: <3CEABFCF.35B80817@mindspring.com> Date: Tue, 21 May 2002 14:44:47 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson Cc: Maxime Henrion , arch@freebsd.org Subject: Re: a virtual fs to allow root mounting of any fs without special code References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Robert Watson wrote: > > You need to do exactly what you said you don't want people doing, in > > order to achieve proper jails that are indistinguishable by way of the > > root mounts. > > What I'm saying is that if it's a limited-purpose file system that doesn't > follow the normal conventions for vnodes and their relationship to a > struct mount, we need to prevent people from mis-using the file system, as > it will violate existing code assumptions about the presence of a struct > mount under certain circumstances. If we would like people to be able to > mount it just about anywhere following boot (as with any other synthetic > file system), we'll need a heavy-weight struct mount, which rootfs > currently doesn't have. I think if it's integrated, it needs a "struct mount". Personally, I'd like to see the "real" root union mounted over it. > That said, I'm not sure what you're saying applies. There's nothing > special about "rootfs" itself, it's pretty minimalist, what's special > about it is that it gives you a place to stick devfs during the bootstrap > (etc) so that you can get rid of special mountroot mounting procedures for > other file systems. I.e., the magic in Maxime's patch is in the > general-purpose root mounting case in the boot code, not in rootfs itself. I was really torn on this patch, so I didn't say anything previously: it implements part of one of my suggestions, but it tends to encourage people to not implement the correct solution to root vs. non-root mounting, since it offers a workable workaround to doing the right thing (seperating the mount-into-mountlist from the mount-into-fs-hierarchy is the cannonically correct approach). Now that you've implied the very thing I feared, I guess I need to say something. I would be really unhappy if the mount during boot ended up being significantly different than the mounting after boot. 8-(. There really needs to be a new VFSOP "MOUNTEDON", used to set the "last mounted on" information, which is the main difference (from an FS perspective) between root and non-root mounts. The vnode overlay is also a difference, but it's really obvious how this could be handed in an FS independent manner in higher level FS independent code (this is where the mount-into-fs-hierarchy should be done). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message