From owner-freebsd-hackers Sun Feb 4 17:32:07 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA20873 for hackers-outgoing; Sun, 4 Feb 1996 17:32:07 -0800 (PST) Received: from eac.iafrica.com (slipper101152.iafrica.com [196.7.101.152]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA20815 for ; Sun, 4 Feb 1996 17:32:01 -0800 (PST) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id DAA02768 for hackers@freebsd.org; Mon, 5 Feb 1996 03:30:53 +0200 From: Robert Nordier Message-Id: <199602050130.DAA02768@eac.iafrica.com> Subject: Re: FAT filesystem performance To: hackers@freebsd.org Date: Mon, 5 Feb 1996 03:30:51 +0200 (SAT) In-Reply-To: <199602041854.MAA07227@asgard.bga.com> from "Boyd Faulkner" at Feb 4, 96 12:54:52 pm X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk On Sun, 4 Feb 1996, Boyd Faulkner wrote: > One of the problems of implementing someone else's file system is > error recovery. If you cache FAT and your power goes out, for example, > the FAT on the disk is not consistent. Aside from there being no fsck_msdos, > if you then booted up in DOS, your filesystem would be inconsistent, and > DOS doesn't like or expect that. You can write a fast read-only FAT > FS but you have to fail as FAT would fail, to be truly compatible. The bottom line is that a FAT fs should cache in such a way that the tradeoff between performance and safety is acceptable. But this is a matter of dealing sensibly and appropriately with the data structures, not of imitating the worst aspects of another implementation. If you (potentially) make certain messes, then you ensure they can be cleaned up to the extent that redundancy in the structures permits this. (If they don't permit this very well, you may have made a bad tradeoff.) If existing recovery tools are partially inadequate, you supplement them. The aim isn't to ape DOS, make the same mistakes as DOS, or fail like DOS. The aim is good design; and the same considerations apply whether the fs is shared with DOS or not. If the algorithms end up similar for the same structures, that should be due to similar design tradeoffs, not DOS copying or emulation. DOS FAT failures (in totality) are not idiosyncratic; and even if they were, the "fix" is in supplementing recovery tools, not in a crippled fs design. -- Robert Nordier