From owner-freebsd-fs Mon Jan 13 8:22:22 2003 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5A0837B401 for ; Mon, 13 Jan 2003 08:22:20 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCF9943F18 for ; Mon, 13 Jan 2003 08:22:14 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h0DGMDB4007329; Mon, 13 Jan 2003 08:22:13 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h0DGMB13007328; Mon, 13 Jan 2003 08:22:11 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Mon, 13 Jan 2003 08:22:11 -0800 From: David Schultz To: Tomas Pluskal Cc: Terry Lambert , Bruce Evans , freebsd-fs@FreeBSD.ORG Subject: Re: seeking help to rewrite the msdos filesystem Message-ID: <20030113162211.GA7279@HAL9000.homeunix.com> Mail-Followup-To: Tomas Pluskal , Terry Lambert , Bruce Evans , freebsd-fs@FreeBSD.ORG References: <3E21D9F0.A2AA9F0@mindspring.com> <20030112222759.R23717-100000@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030112222759.R23717-100000@localhost.localdomain> 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 Thus spake Tomas Pluskal : > Thank you all for your comments. > I would like to state here, that I have no experience with > filesystem development at all (well, now I have a bit :) > You told me to look at the cd9660 code, so I did my best to do it like > it's in cd9660... I only partially understand what the code really does. > > By the way, is there any documentation for these things anywhere ? I mean > it is quite hard to understand what pcbmap(), bread(), cluster_read() etc. > and their parameters really mean, just by reading the code... > > If I understand it right, when I assume the file is not fragmented, it is > just a performance issue - it would make the FS slow on fragmented files, > but should not break anything. Is this correct? That's a good point, and I don't know the answer. I used to know the FAT filesystem very well back in my days with an XT clone, so I can probably answer any questions you have on that, but I have little experience with the VFS interface. The routine I would probably want to start looking at is cluster_read(). (Maybe I will do that when I get back from skiing.) Basically, you want to know whether it trusts VOP_BMAP about runs of contiguous blocks, or whether it verifies what vnode/lbn each block corresponds to. Since ffs_bmap() goes out of its way to ensure that it returns accurate information, I would guess the former. Alternatively, you might try testing your code by writing a one-cluster file, then creating another non-empty file, then appending to the first file. If something gets overwritten, then you have a bug. For a more extensive test, you could try untarring two tarballs to different places on an msdosfs volume simultaneously. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message