I'm reading the book "Linux Kernel Development", and there are some important points:
- inode doesn't include filename.
- filenames are stored in directory entry(dentry).
- but dentry is not stored on disk, it's dynamic generated.
Unlike the previous two objects, the dentry object does not correspond to any sort of on-disk data structure.TheVFS creates it on-the-fly from a string representation of a path name. Because the dentry object is not physically stored on the disk, no flag in struct dentry specifies whether the object is modified (that is, whether it is dirty and needs to be written back to disk).
So the question is: where exactly the file names store? and how "list directory" works?