From owner-freebsd-fs Sat Mar 9 14:25:22 2002 Delivered-To: freebsd-fs@freebsd.org Received: from sydney.worldwide.lemis.com (sng-exchange.skynetglobal.com [203.53.129.130]) by hub.freebsd.org (Postfix) with ESMTP id B107437B400 for ; Sat, 9 Mar 2002 14:25:13 -0800 (PST) Received: (from grog@localhost) by sydney.worldwide.lemis.com (8.11.6/8.9.3) id g28BoSg00843; Fri, 8 Mar 2002 22:20:28 +1030 (CST) (envelope-from grog) Date: Fri, 8 Mar 2002 22:20:28 +1030 From: Greg Lehey To: Christoph Hellwig Cc: Andrew Atrens , 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> References: <20020307154319.20172.qmail@web11306.mail.yahoo.com> <20020307180104.A8734@caldera.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020307180104.A8734@caldera.de>; from hch@caldera.de on Thu, Mar 07, 2002 at 06:01:04PM +0100 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF 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 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