From owner-freebsd-fs Thu Mar 7 9:55:12 2002 Delivered-To: freebsd-fs@freebsd.org Received: from web11305.mail.yahoo.com (web11305.mail.yahoo.com [216.136.131.208]) by hub.freebsd.org (Postfix) with SMTP id 3817737B400 for ; Thu, 7 Mar 2002 09:55:08 -0800 (PST) Message-ID: <20020307175507.37816.qmail@web11305.mail.yahoo.com> Received: from [47.248.0.42] by web11305.mail.yahoo.com via HTTP; Thu, 07 Mar 2002 12:55:07 EST Date: Thu, 7 Mar 2002 12:55:07 -0500 (EST) From: Andrew Atrens Subject: Re: is ext2fs a good template for porting a linux filesystem? To: hiten@uk.FreeBSD.org Cc: fs@FreeBSD.org, atrens@nortelnetworks.com In-Reply-To: <20020307165144.A3173@hpdi.ath.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 --- Hiten Pandya wrote: > --- Andrew Atrens wrote: > > Clearcase provides a thin (compilable) shim which fits between the > > linux kernel and their mvfs module. All accesses to data structures > and > > functions (except panic() and printk()) are indirected through the > > shim. > > > This simplifies their porting effort for new versions of the linux > > kernel. It also _might_ make it possible to develop a FreeBSD shim, > > > although I really don't know enough yet to know for sure :) > > According to me, I don't think a "shim" would be needed for the FreeBSD > port, as it has a very simplistic way of dealing with Filesystems, while > Linux uses different files and calls for not so different things; though > I may be wrong. :) Hmm. I don't have the filesystem source code just the shim source code. So I can't fundamentally change how the fs interfaces to the OS. > > > I've been looking at their shim, and at mfs code for clues as to how > > the linux and Freebsd vfs layers might compare. Next I'd like to > look > > at a linux fs that's been ported to FreeBSD. Should I be looking at > > > ext2fs, or is there a better example out there ? > > Sorry for being so longwinded :) > > Hmm, looking at ext2fs is not a bad idea, but not for everything, as > some parts of the FreeBSD ext2fs code have been rewritten, so it > would > not be that useful. Yep, I noticed that, too. > > Also, to know more about the 4.4BSD VFS layer, you should also read > the > PSD (Programmer Supplementary Documents, I think..) available at: > > http://docs.FreeBSD.org/doc/ > > I found the following papers useful, for studying the VFS layer of > FreeBSD (available at the above URL): > > - Memory Base Filesystem > - Filesystem Interface (Towards a compatible Filesystem Interface) > - Berkeley Software Architecture Manual (4.4 Edition) > - 4.4BSD VFS (http://www.pittgoth.com/~hiten/vfs.pdf) > > For the Linux VFS, I would recommend you to read the Linux Kernel > Internals guide found at http://www.linuxdoc.org > > Also have a look at the fs(5) man page, which is excellent at > describing > the fs structure. Thanks for all the references I just I'll get started reading :) .. > Other than that, you should carefully study the nullfs code, Aha! I will check this out too ! Thanks again! Cheers, Andrew -- | Opinions are my own, not those of any employer. ===== +-- | Andrew Atrens | | All opinions expressed are my own, not those of any employer. | +-- --+ ______________________________________________________________________ Find, Connect, Date! http://personals.yahoo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message