1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunHigh Level Design 4*4882a593Smuzhiyun================= 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunAn ext4 file system is split into a series of block groups. To reduce 7*4882a593Smuzhiyunperformance difficulties due to fragmentation, the block allocator tries 8*4882a593Smuzhiyunvery hard to keep each file's blocks within the same group, thereby 9*4882a593Smuzhiyunreducing seek times. The size of a block group is specified in 10*4882a593Smuzhiyun``sb.s_blocks_per_group`` blocks, though it can also calculated as 8 \* 11*4882a593Smuzhiyun``block_size_in_bytes``. With the default block size of 4KiB, each group 12*4882a593Smuzhiyunwill contain 32,768 blocks, for a length of 128MiB. The number of block 13*4882a593Smuzhiyungroups is the size of the device divided by the size of a block group. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunAll fields in ext4 are written to disk in little-endian order. HOWEVER, 16*4882a593Smuzhiyunall fields in jbd2 (the journal) are written to disk in big-endian 17*4882a593Smuzhiyunorder. 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun.. include:: blocks.rst 20*4882a593Smuzhiyun.. include:: blockgroup.rst 21*4882a593Smuzhiyun.. include:: special_inodes.rst 22*4882a593Smuzhiyun.. include:: allocators.rst 23*4882a593Smuzhiyun.. include:: checksums.rst 24*4882a593Smuzhiyun.. include:: bigalloc.rst 25*4882a593Smuzhiyun.. include:: inlinedata.rst 26*4882a593Smuzhiyun.. include:: eainode.rst 27*4882a593Smuzhiyun.. include:: verity.rst 28