diskfs / go-diskfs

MIT License
494 stars 112 forks source link

read GDT table from correct block #232

Closed deitch closed 2 months ago

deitch commented 2 months ago

Fixes #231

For ext4, reading the group descriptor table (GDT), it was assuming that the GDT always followed right after the superblock, which is right after the padding bytes. This is true when blocksize is 1024, as padding = block 0, superblock = block 1, GDT = block 2. However, if it is larger than 1024, then padding + superblock = block 0, GDT = block 1.