VFS with conflicting inodes
Posted: Tue Nov 06, 2012 7:01 am
Hello all,
ATM, I'm developing a VFS, which is coming along nicely, but I've hit a small though problem.
Say we have two filesystems. A root filesystem and a filesystem mounted to a node in the root filesystem.
How to make sure the inodes of the filesystems don't conflict?
Say both filesystems contain 10 nodes, thus have 11 inodes (root_node.inode = 0), how could I determine to what filesystem they belong?
I could off course add a pointer/ID to/for the filesystem to the VFS internal structures, but isn't the whole idea of an inode that it represents only a single node?
I hope my question is clear enough, thanks a lot in advance.
ATM, I'm developing a VFS, which is coming along nicely, but I've hit a small though problem.
Say we have two filesystems. A root filesystem and a filesystem mounted to a node in the root filesystem.
How to make sure the inodes of the filesystems don't conflict?
Say both filesystems contain 10 nodes, thus have 11 inodes (root_node.inode = 0), how could I determine to what filesystem they belong?
I could off course add a pointer/ID to/for the filesystem to the VFS internal structures, but isn't the whole idea of an inode that it represents only a single node?
I hope my question is clear enough, thanks a lot in advance.