summaryrefslogtreecommitdiffstats
path: root/include/linux/mount.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-03-27 13:06:23 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-23 00:04:51 -0400
commit719f5d7f0b90ac2c8f8ca4232eb322b266fea01e (patch)
treeed3f63e0856b8b319764d475e68b35719ac0ccb9 /include/linux/mount.h
parent73cd49ecdde92fdce131938bdaff4993010d181b (diff)
downloadlinux-719f5d7f0b90ac2c8f8ca4232eb322b266fea01e.tar.gz
linux-719f5d7f0b90ac2c8f8ca4232eb322b266fea01e.tar.xz
[patch 4/7] vfs: mountinfo: add mount peer group ID
Add a unique ID to each peer group using the IDR infrastructure. The identifiers are reused after the peer group dissolves. The IDR structures are protected by holding namepspace_sem for write while allocating or deallocating IDs. IDs are allocated when a previously unshared vfsmount becomes the first member of a peer group. When a new member is added to an existing group, the ID is copied from one of the old members. IDs are freed when the last member of a peer group is unshared. Setting the MNT_SHARED flag on members of a subtree is done as a separate step, after all the IDs have been allocated. This way an allocation failure can be cleaned up easilty, without affecting the propagation state. Based on design sketch by Al Viro. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r--include/linux/mount.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index f0dfb17ffccc..b4836d58f428 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -57,6 +57,7 @@ struct vfsmount {
struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
struct mnt_namespace *mnt_ns; /* containing namespace */
int mnt_id; /* mount identifier */
+ int mnt_group_id; /* peer group identifier */
/*
* We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
* to let these frequently modified fields in a separate cache line