6 . 6
A L L O C AT I O N P O L I C I E S I N B F S
Figure 6-1 The relationship of allocation groups to physical blocks.
Allocation Groups: The Underlying Organization
To help manage disk space, BFS introduces a concept called allocation groups.
An allocation group is a soft structure in that there is no corresponding data
structure that exists on disk. An allocation group is a way to divide up
the blocks that make up a file system into chunks for the purposes of the
In BFS an allocation group is a collection of at least 8192 file system blocks.
Allocation group boundaries fall on block-sized chunks of the disk block
bitmap. That is, an allocation group is always at least one block of the file
system block bitmap. If a file system has a block size of 1024 bytes (the pre-
ferred and smallest allowed for BFS), then one bitmap block would contain
the state of up to 8192 different blocks (1024 bytes in one block multiplied
by eight, the number of bits in 1 byte). Very large disks may have more than
one bitmap block per allocation group.
If a file system has 16,384 1024-byte blocks, the bitmap would be two
blocks long (2
8192). That would be sufficient for two allocation groups, as
shown in Figure 6-1.
An allocation group is a conceptual aid to help in deciding where to put
various file system data structures. By breaking up the disk into fixed-size
chunks, we can arrange data so that related items are near each other. The
rules for placement are just that--rules--which means they are meant to be
broken. The heuristics used to guide placement of data structures are not
rigid. If disk space is tight or the disk is very fragmented, it is acceptable to
use any disk block for any purpose.
Even though allocation groups are a soft structure, proper sizing can affect
several factors of the performance of the overall file system. Normally an
allocation group is only 8192 blocks long (i.e., one block of the bitmap). Thus,
has a maximum size of 8192 blocks since a
more than one allocation group. If a single
can only map 8192
blocks, this places a maximum size on a file. Assuming perfect allocations
is fully allocated), the maximum amount of data that a
Practical File System Design:The Be File System
, Dominic Giampaolo