From owner-freebsd-fs Sun May 5 20: 6:38 2002 Delivered-To: freebsd-fs@freebsd.org Received: from smtp2.mivlmd.cablespeed.com (smtp2.mivlmd.cablespeed.com [216.45.64.147]) by hub.freebsd.org (Postfix) with SMTP id 6B84037B40A for ; Sun, 5 May 2002 20:06:35 -0700 (PDT) Received: (qmail 18092 invoked by uid 0); 6 May 2002 03:06:06 -0000 Received: from unknown (HELO cablespeed.com) (216.45.72.227) by 0 with SMTP; 6 May 2002 03:06:06 -0000 Message-ID: <3CD5F31D.F30573F1@cablespeed.com> Date: Sun, 05 May 2002 23:06:05 -0400 From: Chuck McCrobie X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: dak Cc: freebsd-fs@freebsd.org Subject: Re: Implementing a new FS with loadable modules References: <20020505173855.GA528@nitrogen.WorkGroup> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org dak wrote: > > Hi, > > I'm making my own file system (just for fun and to understand how it works) and I want to implement it > in a module. > > Can anybody points me to a skeleton code which regroups code to mount and everything the system needs > to 'understand' my module ? > I've already looked at 'ntfs' module and others but I don't realy understand the way to follow to make > a module that works :/ > > Thanks in advance. > > -- dak > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-fs" in the body of the message I don't remember there being anything specific about making a module vs. statically linking to the kernel. I have the following in my ODS2 file system implementation: VFS_SET(ods2_vfsops, ods2, VFCF_READONLY); And the Makefile: KMOD= ods2 .include And I get an ods2.ko which can be kldload'ed either manually from the command line or from a "mount_ods2" mount utility. If you like, I can send you the source for ODS-2. I haven't tried it recently, but it did work under 3.x, 4.x upto 4.5. I would agree with what Terry Lambert said about no "skeleton" file system - any file system you would do involves more of the on-disk structure management than anything else - there's very little to skeleton-ize. Chuck McCrobie -- -- ­ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message