Page 1 of 1
Mountpoints
Posted: Sat Dec 29, 2007 5:28 pm
by tigerfish
How does one handle the .. entry for a directory that is being used as a mountpoint? For example, how does one handle
/mountpoint/.. ?
Posted: Sun Dec 30, 2007 4:38 am
by Craze Frog
Posted: Sun Dec 30, 2007 5:12 am
by JamesM
Most (I.e. ext2) filesystems handle ".." implicitly, that is each directory has an entry called "." and one called ".." that point to the respective inodes. They shouldn't need any special handling by the OS.
Posted: Sun Dec 30, 2007 3:56 pm
by xyzzy
Some filesystems might not though, so I handle . and .. in the VFS layer, and ignore . and .. entries that are stored on the filesystem. This makes it easier to handle them going over mountpoints, when the kernel encounters .. in a path, it simply goes to vnode->parent, which works over filesystems.