18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciBlock and inode Bitmaps 48c2ecf20Sopenharmony_ci----------------------- 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciThe data block bitmap tracks the usage of data blocks within the block 78c2ecf20Sopenharmony_cigroup. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciThe inode bitmap records which entries in the inode table are in use. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciAs with most bitmaps, one bit represents the usage status of one data 128c2ecf20Sopenharmony_ciblock or inode table entry. This implies a block group size of 8 \* 138c2ecf20Sopenharmony_cinumber\_of\_bytes\_in\_a\_logical\_block. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciNOTE: If ``BLOCK_UNINIT`` is set for a given block group, various parts 168c2ecf20Sopenharmony_ciof the kernel and e2fsprogs code pretends that the block bitmap contains 178c2ecf20Sopenharmony_cizeros (i.e. all blocks in the group are free). However, it is not 188c2ecf20Sopenharmony_cinecessarily the case that no blocks are in use -- if ``meta_bg`` is set, 198c2ecf20Sopenharmony_cithe bitmaps and group descriptor live inside the group. Unfortunately, 208c2ecf20Sopenharmony_ciext2fs\_test\_block\_bitmap2() will return '0' for those locations, 218c2ecf20Sopenharmony_ciwhich produces confusing debugfs output. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciInode Table 248c2ecf20Sopenharmony_ci----------- 258c2ecf20Sopenharmony_ciInode tables are statically allocated at mkfs time. Each block group 268c2ecf20Sopenharmony_cidescriptor points to the start of the table, and the superblock records 278c2ecf20Sopenharmony_cithe number of inodes per group. See the section on inodes for more 288c2ecf20Sopenharmony_ciinformation. 29