Ext2: Difference between revisions

549 bytes added ,  13 years ago
[unchecked revision][unchecked revision]
Line 271:
block group = (inode – 1) / INODES_PER_GROUP
 
where INODES_PER_GROUP is a field in the Superblock
 
=== Finding an inode inside of a Block Group ===
Once we know which group an inode resides in, we can look up the actual inode by first retrieving that block group's inode table's starting address (see [[#Block_Group_Descriptor|Block Group Descriptor]] above). The index of our inode in this block group's inode table can be determined by using the formula:
 
index = (inode – 1) % INODES_PER_GROUP
 
where INODES_PER_GROUP is a field in the Superblock (the same field which was used to determine which block group the inode belongs to).
 
=== Inode Data Structure ===
Anonymous user