From owner-freebsd-current Tue May 30 23: 3:21 2000 Delivered-To: freebsd-current@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id DDAD037B74A for ; Tue, 30 May 2000 23:03:13 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 3135 invoked from network); 31 May 2000 06:03:05 -0000 Received: from unknown (HELO bde.zeta.org.au) (203.2.228.102) by gidora.zeta.org.au with SMTP; 31 May 2000 06:03:05 -0000 Date: Wed, 31 May 2000 16:03:01 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Garrett Wollman Cc: "Yevmenkin, Maksim N, CSCIO" , 'Zhihui Zhang' , "'freebsd-hackers@freebsd.org'" , "'freebsd-current@freebsd.org'" Subject: RE: stupid FS questions In-Reply-To: <200005302031.QAA30098@khavrinen.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 30 May 2000, Garrett Wollman wrote: > < said: > > > i know that :) i guess my questions were > > 1) why the same piece of code duplicated in all ``mount_xxx'' utilities? > > Because the original loadable module system held strongly to the > religion that the kernel should never load anything of its own > accord. The designers of the current loadable module system made > different design choices, but the some traces of its predecessor still > remain. Including defunct traces like all the duplicated code in the mount utilities :-). Relevant history: RCS file: /home/ncvs/src/lib/libc/gen/getvfsent.c,v Working file: getvfsent.c head: 1.14 ---------------------------- revision 1.13 date: 1998/11/03 15:02:29; author: peter; state: Exp; lines: +10 -1 A feeble attempt at kld compatability. The mount_* programs assume that they cannot mount a filesystem that they cannot see in getvfsbyname(). Part 1 of this is a hack, make vfsisloadable() always return true - the ultimate decider of whether it's loadable or not is kldload() or mount(). Part 2 of this is to have vfsload() call kldload(2) and return success if it works. This means that we will use a viable kld module in preference to an LKM! Ultimately, the thing to do is remove the hacks to do a vfsload in all the ^^^^^^^^^^ should have been more than a year ago mount_* commands and let the kernel do it by itself in mount(2). ---------------------------- RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v Working file: vfs_syscalls.c head: 1.153 ... ---------------------------- revision 1.110 date: 1998/11/03 14:29:09; author: peter; state: Exp; lines: +32 -3 make mount(2) automatically kldload modules if the requested filesystem isn't present. ---------------------------- This commit made the duplicated code redundant except for backwards compatibility. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message