I am recently studying The Operation System, I am confused about how symlink work even after watching some YouTube videos, hope there's someone can help me out with some questions. According to wiki, symlink is pointing to the name of the file but not the inode, if the computer wants to access /opt/be which is a symlink points to /usr/vscode/test.txt, should the procedure be
- Access root inode
- Access the index block pointed by root inode
- Access the inode of /opt
- Access the index block pointed by /opt inode
- Access the inode of /opt/be
- Access the index block pointed by /opt/be inode (the processor gets the filename i.e./usr/vscode/test.txt)
- Access root inode again
- Access index block pointed by root inode ...
I am wondering at step 7, should the process access the root inode again or should access the inode of the file directly?