Whamcloud - gitweb
LUDOC-296 protocol: remove internal details from descriptions
[doc/protocol.git] / path_lookup.txt
1 Path Lookup
2 ~~~~~~~~~~~
3 [[path-lookup]]
4
5 When an operation is to be performed on a file or directory (the
6 "target"), say a 'stat' command, the target is specified with a path.
7 The Lustre client host maintains a cache of information about
8 directories and files. The first time a target is visited the cache
9 must be loaded with that information. To get the information the
10 client requests a 'concurrent read: LOOKUP IBITS' lock on each path
11 element from the root (of the Lustre file system) up to the target.
12 The type of the lock requested for the target will depend on the
13 operation being performed. The client does not need to send a new lock
14 request for a path element if it is currently holding a compatible
15 lock in its cache.
16
17 Each lock request is accompanied by an "intent" that characterizes
18 the intended operation for which the lock is being acquired. For path
19 elements before the target the intent is a 'lookup' and for the target
20 the intent corresponds to an operation on the target. For example, in
21 a 'stat' command the lock's intent for the target will be a getattr.
22