clinuxbitmapfilesystemsext2

EXT2: Understanding inode bitmaps


I have a 1280 inodes per block in a EXT2 filesystem. I want to know the status of the inode 1282, which I know is used. I read the first byte of the inode bitmap corresponding to the second group. I get 0x07, meaning 00000111, meaning that the inode 1282 is free, when it's not.

What's failing in my understanding?

Thanks


Solution

  • The first three inodes are marked as used. Your problem is you are reading the bits from left to right, whereas the lowest bit, i.e. the one on the right, shows you the state of the first inode, so you should be reading the bits from right to left.