Error In EXT2 Documentation
Posted: Wed May 02, 2012 4:20 am
http://wiki.osdev.org/Ext2
The original text stated that if the blockSize is 1024 that the first group block descriptor will start at the 2nd block (zero indexed) or aka 2048, and if the bockSize was other than 1024 the first group block descriptor will start at the 1st block (zero indexed).
Of course this did not make a lot of sense, but I discovered that instead (and this way makes more sense) that if the blockSize is 1024 that the first block group descriptor will start at 1024. This I actually tested and found to be true after using mkfs.ext2.
I am not sure and can not test but it maybe if the majorVersion field is >= 1 then you will have the extended super block (2048 byte superblock instead of 1024) and then it would make sense for the first group descriptor block to start at offset 2048 instead of 1024 because otherwise you would have the extended superblock (1024 bytes) and the first block group descriptor sitting on top of each other which has to be incorrect.
EDIT:
Anyway, I left a note there for future readers. To at least get them to double check if they run into problems, and hopefully if one or more people verify then we could fix it on the wiki.
EDIT:
Wait, found something funny in my own code. Maybe indeed the wiki page is correct. Let me figure out what kind of weird mistake I made.
The original text stated that if the blockSize is 1024 that the first group block descriptor will start at the 2nd block (zero indexed) or aka 2048, and if the bockSize was other than 1024 the first group block descriptor will start at the 1st block (zero indexed).
Of course this did not make a lot of sense, but I discovered that instead (and this way makes more sense) that if the blockSize is 1024 that the first block group descriptor will start at 1024. This I actually tested and found to be true after using mkfs.ext2.
I am not sure and can not test but it maybe if the majorVersion field is >= 1 then you will have the extended super block (2048 byte superblock instead of 1024) and then it would make sense for the first group descriptor block to start at offset 2048 instead of 1024 because otherwise you would have the extended superblock (1024 bytes) and the first block group descriptor sitting on top of each other which has to be incorrect.
EDIT:
Anyway, I left a note there for future readers. To at least get them to double check if they run into problems, and hopefully if one or more people verify then we could fix it on the wiki.
EDIT:
Wait, found something funny in my own code. Maybe indeed the wiki page is correct. Let me figure out what kind of weird mistake I made.