Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 1998 07:03:22 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        mike@smith.net.au (Mike Smith)
Cc:        abial@nask.pl, freebsd-current@FreeBSD.ORG
Subject:   Re: FreeBSD in less than 4MB RAM
Message-ID:  <199807070703.AAA03715@usr06.primenet.com>
In-Reply-To: <199807061550.IAA03457@antipodes.cdrom.com> from "Mike Smith" at Jul 6, 98 08:50:24 am

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807070703.AAA03715>