From 6eb6891eaf7f49582f95dbfe11dee4d1ec4f8e05 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 16 Jan 2010 14:10:21 -0500 Subject: [PATCH] --- yaml --- r: 185700 b: refs/heads/master c: 2f99cc6e4688faf5f03f9afe5e1c6097278c75b2 h: refs/heads/master v: v3 --- [refs] | 2 +- .../Documentation/filesystems/sharedsubtree.txt | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9efe286e462e..6da00708050c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 796a6b521d0eadb338adf8cf7e482351c3a8a7b4 +refs/heads/master: 2f99cc6e4688faf5f03f9afe5e1c6097278c75b2 diff --git a/trunk/Documentation/filesystems/sharedsubtree.txt b/trunk/Documentation/filesystems/sharedsubtree.txt index 23a181074f94..fc0e39af43c3 100644 --- a/trunk/Documentation/filesystems/sharedsubtree.txt +++ b/trunk/Documentation/filesystems/sharedsubtree.txt @@ -837,6 +837,9 @@ replicas continue to be exactly same. individual lists does not affect propagation or the way propagation tree is modified by operations. + All vfsmounts in a peer group have the same ->mnt_master. If it is + non-NULL, they form a contiguous (ordered) segment of slave list. + A example propagation tree looks as shown in the figure below. [ NOTE: Though it looks like a forest, if we consider all the shared mounts as a conceptual entity called 'pnode', it becomes a tree] @@ -874,8 +877,19 @@ replicas continue to be exactly same. NOTE: The propagation tree is orthogonal to the mount tree. +8B Locking: + + ->mnt_share, ->mnt_slave, ->mnt_slave_list, ->mnt_master are protected + by namespace_sem (exclusive for modifications, shared for reading). + + Normally we have ->mnt_flags modifications serialized by vfsmount_lock. + There are two exceptions: do_add_mount() and clone_mnt(). + The former modifies a vfsmount that has not been visible in any shared + data structures yet. + The latter holds namespace_sem and the only references to vfsmount + are in lists that can't be traversed without namespace_sem. -8B Algorithm: +8C Algorithm: The crux of the implementation resides in rbind/move operation.