Lines Matching full:directory
2 Directory Locking
6 Locking scheme used for directory operations is based on two
10 When taking the i_rwsem on multiple non-directory objects, we
16 1) read access. Locking rules: caller locks directory we are accessing.
25 4) rename() that is _not_ cross-directory. Locking rules: caller locks the
27 need to lock two inodes of different type (dir vs non-dir), we lock directory
36 * check that source is not a directory
42 6) cross-directory rename. The trickiest in the whole bunch. Locking
55 the directory first. If we need to lock two inodes of the same type,
66 If no directory is its own ancestor, the scheme above is deadlock-free.
76 (1) if object removal or non-cross-directory rename holds lock on A and
78 acquire the lock on B. (Proof: only cross-directory rename can change
81 (2) if cross-directory rename holds the lock on filesystem, order will not
82 change until rename acquires all locks. (Proof: other cross-directory
86 (3) locks on non-directory objects are acquired only after locks on
87 directory objects, and are acquired in inode pointer order.
89 non-directory object, except renames, which take locks on source and
98 By (3), any process holding a non-directory lock can only be
99 waiting on another non-directory lock with a larger address. Therefore
101 non-directory objects are not included in the set of contended locks.
106 Any contended object is either held by cross-directory rename or
108 operation other than cross-directory rename. Then the lock this operation
111 It means that one of the operations is cross-directory rename.
114 own descendent. Moreover, there is exactly one cross-directory rename
117 Consider the object blocking the cross-directory rename. One
118 of its descendents is locked by cross-directory rename (otherwise we
120 means that cross-directory rename is taking locks out of order. Due
122 But locking rules for cross-directory rename guarantee that we do not
128 the only operation that could introduce loops is cross-directory rename.
139 ability to check that directory is a descendent of another object. Current
140 implementation assumes that directory graph is a tree. This assumption is
141 also preserved by all operations (cross-directory rename on a tree that would
144 Notice that "directory" in the above == "anything that might have