struct mnt_namespace { atomic_t struct vfsmount * struct list_head

10Note that chroot environments do not require a separate namespace. Although they cannot access the complete directory tree, they are affected by changes to their superordinate namespace — unmounting a directory, for example — if the changes are in their territory.

count root; list;

count is a usage counter to specify the number of processes using the namespace. root points to the vfsmount instance of the root directory, and list is the start of a doubly linked list that holds all vfsmount instances linked by their mnt_list elements.

Namespace manipulation operations such as mount and umount do not act on a global data structure of the kernel (as was previously the case). Instead, they manipulate the namespace instance of the current process that can be accessed via the task structure element of the same name. The change affects all members because all processes of a namespace share the same namespace instance.

Continue reading here: Directory Entry Cache

Was this article helpful?

0 0