Whamcloud - gitweb
LUDOC-293 protocol: Merge all recent patches
[doc/protocol.git] / path_lookup.txt
diff --git a/path_lookup.txt b/path_lookup.txt
new file mode 100644 (file)
index 0000000..fccb951
--- /dev/null
@@ -0,0 +1,22 @@
+Path Lookup
+-----------
+[[path-lookup]]
+
+When an operation is to be performed on a file or directory (the
+"target"), say a 'stat' command, the target is specified with a path.
+The Lustre client host maintains a cache of information about
+directories and files. The first time a target is visited the cache
+must be loaded with that information. To get the information the
+client requests a 'concurrent read: LOOKUP IBITS' lock on each path
+element from the root (of the Lustre file system) up to the target.
+The type of the lock requested for the target will depend on the
+operation being performed. The client does not need to send a new lock
+request for a path element if it is currently holding a compatible
+lock in its cache.
+
+Each lock request is accompanied by an "intent" that characterizes
+the intended operation for which the lock is being acquired. For path
+elements before the target the intent is a 'lookup' and for the target
+the intent corresponds to an operation on the target. For example, in
+a 'stat' command the lock's intent for the target will be a getattr.
+