next up previous contents
Next: 3.5 Private VFS State Up: 3. Mechanisms for Interposition Previous: 3.3 Using Links Among

   
3.4 Composition

As mentioned in Section sec-bg-vnode-stack-interposition, composition is the term for concurrency control and failure atomicity for an operation that is performed on all the vnodes in an interposition DAG.

My work provides only concurrency control. Pre-existing file system code sets a lock (on a single vnode) at the start of each operation and drops it at the end of the operation. The composition problem is how to extend the control of this lock over all the vnodes in the interposition DAG, without making any changes to existing data structures. Fortunately, the v_lock field within a vnode is a pointer to a reference-counted ``lock variable'' structure. Each time a new vnode is interposed upon an existing one, the interposer's lock field is made another pointer to the lock variable of the interposed vnode. (This code is in macro VN_INIT2, which is referenced but not shown in Figure fig-wrapfs-interpose.) This technique ensures that all vnodes in a DAG are working with the same lock variable. When the lock is set or dropped, every vnode in the DAG is affected simultaneously. See Sections sec-design-eval-performance and sec-eval-experiments for evaluation of the impact of locking on performance.


next up previous contents
Next: 3.5 Private VFS State Up: 3. Mechanisms for Interposition Previous: 3.3 Using Links Among
Erez Zadok
1999-12-07