Struct dentry
In our earlier discussion, we gained an understanding on how a typical disk filesystem represents each directory through an inode structure, and how a directory block on disk represents information of files under that directory. When user-mode applications initiate file access operations such as open() with a complete path such as /root/test/abc , the VFS will need to perform directory lookup operations to decode and validate each component specified in the path.
For efficient lookup and translation of components in a file path, VFS enumerates a special data structure, called dentry. A dentry object contains a string name of the file or directory, a pointer to its inode, and a pointer to the parent dentry. An instance of dentry ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access