Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2000 10:11:51 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Mark Ovens <marko@freebsd.org>
Cc:        Dan Nelson <dnelson@emsphone.com>, Bruce Petro <bpetro@usa.com>, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Compare FBSD File System
Message-ID:  <20000916101151.W71517@wantadilla.lemis.com>
In-Reply-To: <20000915121449.B257@parish>; from marko@freebsd.org on Fri, Sep 15, 2000 at 12:14:49PM %2B0100
References:  <380327008.968949972194.JavaMail.root@web302-mc.mail.com> <20000914140402.A5897@dan.emsphone.com> <20000915112618.L71517@wantadilla.lemis.com> <20000915121449.B257@parish>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000916101151.W71517>