diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-19 06:24:21 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-19 06:24:21 +0000 |
commit | beba2c930cbfe78cec732754669e47738f9929b5 (patch) | |
tree | 8f84c2568016a03436e9257970bd0d9f79c57265 /sys/kern/vfs_conf.c | |
parent | 9e003228b65115ddf59cf0d8ac934fbc2c771d09 (diff) | |
download | FreeBSD-src-beba2c930cbfe78cec732754669e47738f9929b5.zip FreeBSD-src-beba2c930cbfe78cec732754669e47738f9929b5.tar.gz |
Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapse
addaliasu() into addalias() (no operational change) and clarify comments
relating to a trick that vclean() uses.
The fix to BOOTP is yet another hack. Actually, rootfsid handling
is already a major hack. The whole thing needs to be cleaned up.
Reviewed by: David Greenman <dg@root.com>, Alan Cox <alc@cs.rice.edu>
Diffstat (limited to 'sys/kern/vfs_conf.c')
-rw-r--r-- | sys/kern/vfs_conf.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 87f3e4a..7c11af7 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -136,7 +136,27 @@ vfs_mountrootfs(void *unused) mp->mnt_flag |= MNT_ROOTFS; /* - * Attempt the mount + * If we have no idea what the device is because the VFS root mount + * initialization code couldn't figure it out, take a guess by + * assuming that vfs_getnewfsid() will be called when we try the + * mount. For the moment this is necessary for NFS-baesd BOOTP + * boots. Ultimately we would like to get rid of 'rootdev' entirely + * and go with a linked list of possible roots and device-specific + * auxillary data that we do not try to interpret ourselves. + */ + if (rootdev == NODEV && rootdevs[0] == NODEV) + rootdev = vfs_getrootfsid(mp); + + /* + * Attempt the mount. This is rather messy due to many historical + * layers. Basically what it comes down to is that 'rootdev' is an + * override to the rootdevs[] array. The rootdevs[] array itself + * cannot normally be accessed directly by other modules, but FFS + * plays with it. NFS, on the otherhand, has no clue what the + * device assignment for a mount will be until it actually does it. + * + * During the loop we set rootdev to rootdevs[i]. This is used + * by FFS and a few other modules. It is ignored by NFS. */ err = ENXIO; orootdev = rootdev; |