File systems iconFile Systems
Data BlocksN blocksInode TableN blocksInodeBitmap1 blockBlockBitmap1 blockBlock GroupDescriptorN blocksSuperBlock1 block

Block Group Descriptor

The block group descriptor table is an array of block group descriptor, used to define parameters of all the block groups. It provides the location of the inode bitmap and inode table, block bitmap, number of free blocks and inodes, and some other useful information. The block group descriptor table starts on the first block following the superblock. This would be the third block on a 1KiB block file system, or the second block for 2KiB and larger block file systems. Shadow copies of the block group descriptor table are also stored with every copy of the superblock. Depending on how many block groups are defined, this table can require multiple blocks of storage. Always refer to the superblock in case of doubt.

For each block group in the file system, such a group_desc is created. Each represent a single block group within the file system and the information within any one of them is pertinent only to the group it is describing. Every block group descriptor table contains all the information about all the block groups.

Offset (bytes)Size (bytes)Description
04bg_block_bitmap
44bg_inode_bitmap
84bg_inode_table
122bg_free_blocks_count
142bg_free_inodes_count
162bg_used_dirs_count
182bg_pad
2012bg_reserved

bg_block_bitmap

Offset: 0 bytes
Size: 4 bytes

32bit block id of the first block of the "block bitmap" for the group represented.

The actual block bitmap is located within its own allocated blocks starting at the block ID specified by this value.