From owner-freebsd-questions Fri Sep 15 17:42:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id C994237B43E; Fri, 15 Sep 2000 17:42:23 -0700 (PDT) Received: (from grog@localhost) by wantadilla.lemis.com (8.11.0/8.9.3) id e8G0fpa98286; Sat, 16 Sep 2000 10:11:51 +0930 (CST) (envelope-from grog) Date: Sat, 16 Sep 2000 10:11:51 +0930 From: Greg Lehey To: Mark Ovens Cc: Dan Nelson , Bruce Petro , freebsd-questions Subject: Re: Compare FBSD File System Message-ID: <20000916101151.W71517@wantadilla.lemis.com> References: <380327008.968949972194.JavaMail.root@web302-mc.mail.com> <20000914140402.A5897@dan.emsphone.com> <20000915112618.L71517@wantadilla.lemis.com> <20000915121449.B257@parish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000915121449.B257@parish>; from marko@freebsd.org on Fri, Sep 15, 2000 at 12:14:49PM +0100 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 15 September 2000 at 12:14:49 +0100, Mark Ovens wrote: > On Fri, Sep 15, 2000 at 11:26:18AM +0930, Greg Lehey wrote: >> On Thursday, 14 September 2000 at 14:04:02 -0500, Dan Nelson wrote: >>> In the last episode (Sep 14), Bruce Petro said: >>>> Could someone shoot back a brief review of how the FBSD file system >>>> compares to the old FAT system? General information is fine, but >>>> please also cover: >>>> >>>> 1. Efficient Disk Usage - any min file size etc like fat? >>> >>> ffs has an 8k blocksize and a 1k fragment size. Small files and the >>> ends of large files are put into fragments. >> >> You have a choice of block and frag size. Basically, >> >> 1. Frags must be a power of 2 and at least 512 bytes long. >> 2. Blocks may contain 1 (I think), 2, 4 or 8 frags. >> 3. Theoretically blocks may be any size within the above constraints, >> but in practice you'd probably run into problems with blocks of >> more than 64 kB. >> 4. The larger the block size, the fewer inodes newfs reserves (though >> you can override this choice). >> > > Can you clarify the way these are actually used? > > AIUI, with 8KB blocks and 1KB frags, if a file is 8194 bytes (8KB + 2 > bytes) the file will use one whole block and the extra 2 bytes will > use 1 frag of another block. The remaining 1022 bytes of that frag > will be unavailable to other files but the remaining 7 frags in the > block will be (this is why FFS has less wasted space than FAT, which > would make the remaining 8190 bytes in the block, cluster in FAT > terminology, unavailable). Is this correct? Yes. > Are the blocks which are used "by frag" in a special reserved area of > the disk or can any block be used for this purpose as and when > required and, if so, how does the system keep track of which frags in > a block are in use? Is it meta-data stored in the directory entries or > in the inode table perhaps? No. Where possible, frag blocks are in the same cylinder group as the data blocks, for the reasons Konrad has already mentioned. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message