Newsgroups: comp.sys.amiga.programmer Path: utzoo!utgpu!watserv1!watdragon!rose!ccplumb From: ccplumb@rose.uwaterloo.ca (Colin Plumb) Subject: Re: FFS Message-ID: <1991Apr5.101335.11607@watdragon.waterloo.edu> Sender: news@watdragon.waterloo.edu (News Owner) Organization: University of Waterloo References: <1991Mar26.211632.24246@watdragon.waterloo.edu> <1991Apr1.220945.24885@unislc.uucp> Date: Fri, 5 Apr 1991 10:13:35 GMT Lines: 36 dave@unislc.uucp (Dave Martin) wrote: >From article <1991Mar26.211632.24246@watdragon.waterloo.edu>, by ccplumb@rose.uwaterloo.ca (Colin Plumb): >> >> The FFS doesn't enforce any track size, blocks per track, or whatever. >> It just wants blocks numbered x through y, for some x>0. As of 1.3, it > > y-x > 0 ? No, actually. The file system uses "0" as a null vlaue, so it can't use block number 0. Typically, the first two blocks of a partition are left as dummy "boot blocks", so x=2. >> In any case, if the last usable block is y, then both the old and new >> file systems use block (y+1)/2 to store the root block, and usually >> allocate bitmap blocks immediately thereafter, but they can go anywhere. > > I assume that you mean (x+y+1)/2 ? I would hate to think that if I have > a partition from block # 4000 to 5000, that the root block is 2500 and > not 4500. 1/2 :-) No, actually I meant (y+1)/2, because I assumed the partition started with block 0. If you look at your partition from blocks 4000 to 5000, you'll find that DOS uses logical block numbers 0 through 1000. These were the block numbers I was referring to. You can, in the mountlist or partition block, select the number of reserved blocks at the beginning and end of a partition. For historical reasons (namely, floppies, where the root directory is block 880, while block 881 is the middle of the usable blocks 2..1759), the low-end "reserved" blocks aren't counted in the partition-centre computation, but when the high-end "preallocated" blocks were added, they were allowed for, and the partition is deemed to end where usable space ends, which is <# of preallocated blocks> before the end of the partition proper. -- -Colin