From owner-freebsd-current Tue Jul 7 00:03:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA10933 for freebsd-current-outgoing; Tue, 7 Jul 1998 00:03:43 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp03.primenet.com (daemon@smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA10924 for ; Tue, 7 Jul 1998 00:03:38 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id AAA06515; Tue, 7 Jul 1998 00:03:33 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp03.primenet.com, id smtpd006503; Tue Jul 7 00:03:31 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id AAA03715; Tue, 7 Jul 1998 00:03:22 -0700 (MST) From: Terry Lambert Message-Id: <199807070703.AAA03715@usr06.primenet.com> Subject: Re: FreeBSD in less than 4MB RAM To: mike@smith.net.au (Mike Smith) Date: Tue, 7 Jul 1998 07:03:22 +0000 (GMT) Cc: abial@nask.pl, freebsd-current@FreeBSD.ORG In-Reply-To: <199807061550.IAA03457@antipodes.cdrom.com> from "Mike Smith" at Jul 6, 98 08:50:24 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > The second issue is this: currently we're unable to boot (using BIOS) and > > mount as / other filesystems than FFS, NFS and CD9660. It would be great > > if we could use MSDOSFS as well (using special version of biosboot, with > > FAT support compiled-in instead of FFS). Device nodes would be on DEVFS. > > All you have to do is add the mountroot stuff to MSDOSFS - nobody would > complain if you did. I would. The "mountroot" and "mount" disctinctions are relatively stupid. There is duplicate code all over the place, only it's "almost duplicate" and causes lots of problems. The main tigers in the way of progress are NFS root mounts and CD9660, which is so conditionalized that it's nearly impossible to tread safely through the minefield. The way to fix this is to move the "root-ness" and "non-root-ness" to upper level (common!) code. The implementaiton of this is rather simple: 1) Change the per-FS VOP_MOUNT to mount the FS into the "mounted FS's" mount struct list *only*. 2) When doing a root mount, point to the appropriate list entry. 3) When doing a non-root ("map-into-hierarchy") mount, A) Point to the appropriate list entry using the "covered by" vnode pointer. B) Call the new VFSOP "SETMOUNT" to set the "last mounted on" field of the superblock. 4) Call back into the NFS export code from the upper level code. 5) return. I have implemented this three times (so far) in various versions of FreeBSD. This results in the following benefits: 1) All FS types may be mounted as root 2) All FS types may be exported via NFS 3) All commonly miswritten and/or "bit-rotted" code, like LFS's mount and NFS interaction code, is centrally maintained and automatically synchronized for all FS's. Therefore, all code is less succeptible to miswriting and/or "bit-rot". 4) New FS implementations become less work. 5) Kernel size is reduced. Perhaps you can get these changes in where I have failed. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message