Merge branches 'clk-fixed-rate-remove' and 'clk-qcom-cleanup' into clk-next
[sfrench/cifs-2.6.git] / Documentation / filesystems / ext4 / ondisk / bigalloc.rst
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Bigalloc
4 --------
5
6 At the moment, the default size of a block is 4KiB, which is a commonly
7 supported page size on most MMU-capable hardware. This is fortunate, as
8 ext4 code is not prepared to handle the case where the block size
9 exceeds the page size. However, for a filesystem of mostly huge files,
10 it is desirable to be able to allocate disk blocks in units of multiple
11 blocks to reduce both fragmentation and metadata overhead. The
12 `bigalloc <Bigalloc>`__ feature provides exactly this ability. The
13 administrator can set a block cluster size at mkfs time (which is stored
14 in the s\_log\_cluster\_size field in the superblock); from then on, the
15 block bitmaps track clusters, not individual blocks. This means that
16 block groups can be several gigabytes in size (instead of just 128MiB);
17 however, the minimum allocation unit becomes a cluster, not a block,
18 even for directories. TaoBao had a patchset to extend the “use units of
19 clusters instead of blocks” to the extent tree, though it is not clear
20 where those patches went-- they eventually morphed into “extent tree v2”
21 but that code has not landed as of May 2015.
22