diskfs / go-diskfs

MIT License
515 stars 116 forks source link

read GDT table from correct block #232

Closed deitch closed 4 months ago

deitch commented 4 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.