Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 22:20:28 +1030
From:      Greg Lehey <grog@FreeBSD.ORG>
To:        Christoph Hellwig <hch@caldera.de>
Cc:        Andrew Atrens <andrew_atrens@yahoo.ca>, fs@FreeBSD.ORG, atrens@nortelnetworks.com
Subject:   Re: is ext2fs a good template for porting a linux filesystem?
Message-ID:  <20020308222026.B742@sydney.worldwide.lemis.com>
In-Reply-To: <20020307180104.A8734@caldera.de>; from hch@caldera.de on Thu, Mar 07, 2002 at 06:01:04PM %2B0100
References:  <20020307154319.20172.qmail@web11306.mail.yahoo.com> <20020307180104.A8734@caldera.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday,  7 March 2002 at 18:01:04 +0100, Christoph Hellwig wrote:
> On Thu, Mar 07, 2002 at 10:43:19AM -0500, Andrew Atrens wrote:
>> Clearcase provides a thin (compilable) shim which fits between the
>> linux kernel and their mvfs module.
>
> Where is this source part available?
>
>> It also _might_ make it possible to develop a FreeBSD shim, although I
>> really don't know enough yet to know for sure :)
>
> I think that would be very difficult as the Linux VFS is fundamentally
> different from FreeBSD and other 4.4BSD derivates.

Or UNIX, for that matter.

> Depending on how much of the generic library code for filesystems it
> uses on Linux it might be possible, but I bet it would be even more
> unstable than the already rather bad Linux version..

I would suspect that any shim solution is going to make very
significant assumptions about the nature of the interface on the other
side.  I'd be astonished if you (Andrew) were to be successful in this
approach.  If you were, Christoph would almost certainly be correct in
his assumptions about stability.

>> 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 ?
>
> The FreeBSD ext2 driver might be used as an example of how to glue
> a linux 1.x/2.0 filesystem into FreeBSD, it is rather useless for
> current Linux filesystems and also a bad example for almost anything
> else :)

The ext2fs code in FreeBSD bears little relationship to the Linux
ext2fs code.  You could spend a lot of time investigating the
differences, but I think the only result would be an enhanced
understanding of software history.

So how do you go about doing it?  My personal approach is: you
probably won't.  If you really want to spend a *lot* of work, you
might consider writing a generic shim layer which makes it possible to
run Linux file system modules under FreeBSD.  The performance would
almost certainly suffer, but for some applications (for example, being
able to access the file system at all) it might be sufficient.  I
don't even want to think about where to start.

Greg
--
See complete headers for address and phone numbers

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?20020308222026.B742>