From owner-freebsd-hackers Wed Oct 1 16:49:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA17001 for hackers-outgoing; Wed, 1 Oct 1997 16:49:55 -0700 (PDT) Received: from usr04.primenet.com (tlambert@usr04.primenet.com [206.165.6.204]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA16993; Wed, 1 Oct 1997 16:49:48 -0700 (PDT) Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id QAA22980; Wed, 1 Oct 1997 16:49:44 -0700 (MST) From: Terry Lambert Message-Id: <199710012349.QAA22980@usr04.primenet.com> Subject: Re: kernel modules To: sauce@cs.columbia.edu (Alex Shender) Date: Wed, 1 Oct 1997 23:49:44 +0000 (GMT) Cc: fs@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <199710010450.AAA12529@guppy.cs.columbia.edu> from "Alex Shender" at Oct 1, 97 00:50:44 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I was wondering if any of you have written any filesytems as kernel > modules. If so can you send me a pointer to the code. I am currently > developing a filesystem for linux and Solaris and would like to port it to > FreeBSD and would really appreciate it, if I could do it as a module. Look in the source tree. NFS and several other FS's can be loaded as modules. When I wrote the initial module code, I converted procfs as my example. The initialization code in the FS is a bit bogus: if you need to add new VOP_* calls, you will need to recompile the kernel anyway. This is because of the fact that the number of VOP entries is counted from the UFS_VNOPS table instead of the actual number of VOPS_* calls defined in vnode_if.c, and the vnode_if.c (a generated file) is not padded at all to allow growth. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.