Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2002 16:51:44 +0000
From:      Hiten Pandya <hiten@uk.FreeBSD.org>
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>

next in thread | raw e-mail | index | archive | help

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

--- Andrew Atrens <andrew_atrens@yahoo.ca> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020307165144.A3173>