1 .. SPDX-License-Identifier: GPL-2.0
6 ext4 allocates storage space in units of “blocks”. A block is a group of
7 sectors between 1KiB and 64KiB, and the number of sectors must be an
8 integral power of 2. Blocks are in turn grouped into larger units called
9 block groups. Block size is specified at mkfs time and typically is
10 4KiB. You may experience mounting problems if block size is greater than
11 page size (i.e. 64KiB blocks on a i386 which only has 4KiB memory
12 pages). By default a filesystem can contain 2^32 blocks; if the '64bit'
13 feature is enabled, then a filesystem can have 2^64 blocks. The location
14 of structures is stored in terms of the block number the structure lives
15 in and not the absolute offset on disk.
17 For 32-bit filesystems, limits are as follows:
43 * - Blocks Per Block Group
48 * - Inodes Per Block Group
58 * - Blocks Per File, Extents
63 * - Blocks Per File, Block Maps
67 - 4,398,314,962,956 (really 2^32 due to field size limitations)
68 * - File Size, Extents
73 * - File Size, Block Maps
79 For 64-bit filesystems, limits are as follows:
105 * - Blocks Per Block Group
110 * - Inodes Per Block Group
120 * - Blocks Per File, Extents
125 * - Blocks Per File, Block Maps
129 - 4,398,314,962,956 (really 2^32 due to field size limitations)
130 * - File Size, Extents
135 * - File Size, Block Maps
141 Note: Files not using extents (i.e. files using block maps) must be
142 placed within the first 2^32 blocks of a filesystem. Files with extents
143 must be placed within the first 2^48 blocks of a filesystem. It's not
144 clear what happens with larger filesystems.