From owner-freebsd-fs Thu Mar 7 8:56: 4 2002 Delivered-To: freebsd-fs@freebsd.org Received: from hpdi.ath.cx (pc2-nthf5-0-cust237.not.cable.ntl.com [80.4.35.237]) by hub.freebsd.org (Postfix) with ESMTP id 0131037B41A for ; Thu, 7 Mar 2002 08:55:57 -0800 (PST) Received: (from hitenp@hpdi.ath.cx) by hpdi.ath.cx (8.11.6/8.11.6) id g27GpiW03233; Thu, 7 Mar 2002 16:51:44 GMT (envelope-from hitenp@hpdi.ath.cx) Date: Thu, 7 Mar 2002 16:51:44 +0000 From: Hiten Pandya To: andrew_atrens@yahoo.ca Cc: fs@FreeBSD.org, atrens@nortelnetworks.com Subject: Re: is ext2fs a good template for porting a linux filesystem? Message-ID: <20020307165144.A3173@hpdi.ath.cx> Reply-To: hiten@uk.FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD hpdi.ath.cx 5.0-CURRENT FreeBSD 5.0-CURRENT Organisation: The FreeBSD Project X-PGP-Key: http://www.pittgoth.com/~hiten/pubkey.asc 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 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable --- 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,=20 > 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. :) > 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=20 > at a linux fs that's been ported to FreeBSD. Should I be looking at=20 > 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. 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. Other than that, you should carefully study the nullfs code, which will give you some help in porting, not forgetting the ext2fs= =20 code. Don't hesitate to contact me for any help. :) Regards, --=20 Hiten Pandya http://jfs4bsd.sf.net - JFS for FreeBSD (JFS4BSD) http://www.FreeBSD.org - The Power to Serve --huq684BweRXVnRxX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8h5qfhh1dveTjA8MRAiAwAJ9h0YCBxNjLv4Vh1+gN3yAelgW0HgCdEUo3 en9GuTCNL2DXwyKSV6iOX3E= =J6Dv -----END PGP SIGNATURE----- --huq684BweRXVnRxX-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message