While I was learning about inodes in ext4 file systems(or almost all Linux file systems), I found that directories also have inode entries. But I am a bit confused about a subtle aspect.
- Are inode structures of directories similar to inode entries of files? link
Or
- Are they different from file inodes(like
.txt, etc)? link
In both the articles, it is mentioned directories are just files mapping the file name to the inode values. But in the first link, it addresses the directory content(the map) as a separate data pool segment in a block of memory, and the inode table stores the inode value of the data pool while in the other, the author mentions (in the image) that the mapping is the inode structure of the directory.
So, the doubt arises, is the mapping content of directories stored in a separate block of memory and the inode entry in the inode table points to that particular memory block or, are they stored together (the map between the file name and the inode values) in the inode table itself as an inode entry without any extra block of memory containing the data of children files and directories?
Please help.