Ext4: Difference between revisions

1,410 bytes added ,  3 years ago
Add explanation.
[unchecked revision][unchecked revision]
(Add explanation.)
Line 308:
 
== Block Group Descriptor ==
 
See [[Ext2#Block_Group_Descriptor_Table|Ext2]] wiki page for an introduction to block group descriptor tables.
 
In Ext4, the block descriptors, in addition to their role in Ext2 as information of important data structures, have new features such as flex block groups and meta block groups.
 
In a flex block group, multiple block groups are grouped together into a flex block group, as the group descriptor records the location of both bitmaps and the inode table. This allows for better data locality.
 
In a meta block group, the filesystem is partitioned into multiple 'metablock' groups. This allows the metadata of the block group descriptors to be stored in one block. This strategy also increases the maximum filesystem size to 512PiB from 256TiB without metablock groups.
 
=== Locating the Block Group Descriptors ===
 
Locating the Block Group Descriptors is similar to Ext2, except for metablock and flex block group locations.
 
 
One can check for flex block groups by checking the required option 'Flex Block Group'. The structure for that is found in the superblock data structure.
 
Flex Block Group info Structure, these fields are atomic integers:
 
{| {{wikitable}}
! Starting
Byte
! Ending
Byte
! Size
in Bytes
! Description
|-
| 0 || 7 || 8 || Atomic 64 bit free clusters.
|-
| 8 || 11 || 4 || Atomic free inodes.
|-
| 12 || 15 || 4 || Atomic used directories.
|}
 
=== Block Group Descriptor ===
 
Block group descriptor Structure:
Anonymous user