From owner-freebsd-current Thu Aug 14 11:40:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA04963 for current-outgoing; Thu, 14 Aug 1997 11:40:49 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA04947 for ; Thu, 14 Aug 1997 11:40:46 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA17226; Thu, 14 Aug 1997 10:54:34 -0700 From: Terry Lambert Message-Id: <199708141754.KAA17226@phaeton.artisoft.com> Subject: Re: Read-only mount of union filesystem To: kato@migmatite.eps.nagoya-u.ac.jp (KATO Takenori) Date: Thu, 14 Aug 1997 10:54:34 -0700 (MST) Cc: dg@root.com, terry@lambert.org, current@FreeBSD.ORG In-Reply-To: <199708140849.RAA04702@gneiss.eps.nagoya-u.ac.jp> from "KATO Takenori" at Aug 14, 97 05:49:46 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I changed the behavior in FreeBSD to what it is now (which is also the > > same as it is in Lite-2). For information on why it is this way, see PR#782. > > In my opinion, the current structure is correct. > > I understand why vfs layer shouldn't reference v_mount. But, IMHO, fs > independent operation should be in upper layer. The problem in PR#782 > may be solved by following method: > > 1. Prepare special mount struct whose mnt_flag is or'ed by special > flag (e.g., MNT_DEAD). > 2. When vnode is cleaned, v_mount points the special mount struct > instead of beeing NULL'ed. > 3. vfs layer checks MNT_RDONLY and MNT_DEAD. Yes. The current arrangement of the mount code is awful; each FS has duplicate mount code, and some have a working root mount and some don't. IMO, the distinction between mounting root vs. mounting non-root, and *especially* the NFS export manipulations, is terribly artificial. In my ideal world, the mount would take place, and there would be a seperate, upper-level mapping of the resulting mountpoint vnode into the FS hierarchy afterwards. It would be this mapping which would do the NFS export manipulations, and handle the "root" vs. "non-root" distinctions. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.