

In more detail, the size of on disk blocks is 512b the size of the blocks in the EX2FS is 1024. So to read a FS block i need to multiply the FS block number by 2 to get the corresponding disk block number and read two disk blocks. This approach works fine for the super block, inode table ect but not for the first data block in the root dir. I know that this is the 202 FS block and have used a seporate FS tool to specifically read block 202 and verify the data in it is correct so i know this is the correct block. However when my OS trys to read the two disk blocks starting at 404 all i get back is 0's. The only difference i can see between this and previous reads is that the block address is much higher than the address of the superblock and other structures. I have no idea what the problem could be or where to go from here, any advice would be welcome.
I test my OS through bochs as i dont want to trash a real HD. I am quite happy to post code but will wait to hear where people think the problem is before copying and pasting vast quantaties of it.
Thanks in advance for any help,
Chris