Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 Block and inode Bitmaps
0004 -----------------------
0005 
0006 The data block bitmap tracks the usage of data blocks within the block
0007 group.
0008 
0009 The inode bitmap records which entries in the inode table are in use.
0010 
0011 As with most bitmaps, one bit represents the usage status of one data
0012 block or inode table entry. This implies a block group size of 8 *
0013 number_of_bytes_in_a_logical_block.
0014 
0015 NOTE: If ``BLOCK_UNINIT`` is set for a given block group, various parts
0016 of the kernel and e2fsprogs code pretends that the block bitmap contains
0017 zeros (i.e. all blocks in the group are free). However, it is not
0018 necessarily the case that no blocks are in use -- if ``meta_bg`` is set,
0019 the bitmaps and group descriptor live inside the group. Unfortunately,
0020 ext2fs_test_block_bitmap2() will return '0' for those locations,
0021 which produces confusing debugfs output.
0022 
0023 Inode Table
0024 -----------
0025 Inode tables are statically allocated at mkfs time.  Each block group
0026 descriptor points to the start of the table, and the superblock records
0027 the number of inodes per group.  See the section on inodes for more
0028 information.