Date: Thu, 11 May 2000 20:15:51 GMT From: mellon@pobox.com To: FreeBSD-gnats-submit@freebsd.org Subject: kern/18505: missing VFS_START call. Message-ID: <200005112015.UAA00265@happy.checkpoint.com>
next in thread | raw e-mail | index | archive | help
>Number: 18505
>Category: kern
>Synopsis: missing VFS_START call.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 11 10:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Anatoly Vorobey
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
5.0-CURRENT
>Description:
VFS_START is not called after VFS_MOUNT in vfs_mountroot_try (vfs_conf.c).
This is contrary to VFS_START's intention and documentation. The deed
only goes unpunished because no filesystem currently does anything on
VFS_START except MFS, but it's only a matter of time before some might
try something. MFS grabs the calling process and turns it into a workhorse
on VFS_START, but MFS won't mount as root so it's okay (and correct)
to call VFS_START there.
>How-To-Repeat:
>Fix:
Two choices:
1) Document VFS_START as a dirty hack made especially for MFS which no
other filesystems should ever use or rely on;
2) (preferrable IMHO) apply the patch below. It also fixes a typo in
the comment for MFS code which stops it from mounting as root.
Index: vfs_conf.c
===================================================================
RCS file: /freebsd/cvs/src/sys/kern/vfs_conf.c,v
retrieving revision 1.50
diff -u -r1.50 vfs_conf.c
--- vfs_conf.c 2000/03/20 16:28:26 1.50
+++ vfs_conf.c 2000/05/11 20:03:06
@@ -235,6 +235,13 @@
/* sanity check system clock against root filesystem timestamp */
inittodr(mp->mnt_time);
vfs_unbusy(mp, curproc);
+
+ /*
+ * MFS grabs the process when it calls VFS_START and doesn't
+ * let it go, but MFS won't allow itself to be mounted as root.
+ */
+
+ error = VFS_START(mp, 0, curproc);
}
return(error);
}
Index: mfs_vfsops.c
===================================================================
RCS file: /freebsd/cvs/src/sys/ufs/mfs/mfs_vfsops.c,v
retrieving revision 1.84
diff -u -r1.84 mfs_vfsops.c
--- mfs_vfsops.c 2000/05/05 09:59:06 1.84
+++ mfs_vfsops.c 2000/05/11 20:03:57
@@ -182,7 +182,7 @@
***
*/
- /* you loose */
+ /* you lose */
panic("mfs_mount: mount MFS as root: not configured!");
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005112015.UAA00265>
