1 AutoGen Definitions lustre_dlm_flags.tpl;
6 f-desc = 'extent, mode, or resource changed';
10 f-name = block_granted;
11 f-mask = on_wire, blocked;
12 f-desc = 'Server placed lock on granted list, or a recovering client wants '
13 'the lock added to the granted list, no questions asked.';
18 f-mask = on_wire, blocked;
20 Server placed lock on conv list, or a recovering client wants the lock
21 added to the conv list, no questions asked.
27 f-mask = on_wire, blocked;
29 Server placed lock on wait list, or a recovering client wants
30 the lock added to the wait list, no questions asked.
39 f-desc = 'blocking or cancel packet was queued for sending.';
42 // Skipped bits 6 and 7
48 Lock is being replayed. This could probably be implied by the fact that
49 one of BLOCK_{GRANTED,CONV,WAIT} is set, but that is pretty dangerous.
56 f-desc = "Don't grant lock, just do intent.";
59 // Skipped bits 10 and 11
64 f-desc = 'lock request has intent';
67 // Skipped bits 13, 14
70 f-name = flock_deadlock;
71 f-mask = on_wire, ast;
72 f-desc = 'flock deadlock detected';
76 f-name = discard_data;
78 f-desc = 'discard (no writeback) on cancel';
84 f-desc = 'Blocked by group lock - wait indefinitely';
88 f-name = block_nowait;
91 Server told not to wait if blocked. For AGL, OST will not send
99 f-desc = 'return blocking lock';
102 // Skipped bits 20, 21, and 22
105 f-name = cancel_on_block;
106 f-mask = on_wire, inherit;
108 Immediatelly cancel such locks when they block some other locks. Send
109 cancel notification to original lock holder, but expect no reply. This is
110 for clients (like liblustre) that cannot be expected to reliably response
115 // Skipped bits 24 through 29
118 f-name = deny_on_contention;
120 f-desc = 'measure lock contention and return -EUSERS if locking contention '
125 f-name = ast_discard_data;
126 f-mask = on_wire, ast;
128 These are flags that are mapped into the flags and ASTs of blocking locks
129 Add FL_DISCARD to blocking ASTs
137 Used for marking lock as a target for -EINTR while cp_ast sleep
138 emulation + race with upcoming bl_ast.
146 Used while processing the unused list to know that we have already
147 handled this lock and decided to skip it.
154 f-mask = local_only, hide_lock;
155 f-desc = 'this lock is being destroyed';
159 f-name = wait_noreproc;
161 f-desc = 'not a real flag, not saved in lock';
167 f-desc = 'cancellation callback already run';
172 f-mask = local_only, hide_lock;
173 f-desc = 'whatever it might mean';
178 f-mask = local_only, gone, hide_lock;
179 f-desc = "don't run the cancel callback under ldlm_cli_cancel_unused";
185 f-desc = 'lock cancel has already been sent';
191 f-desc = 'local lock (ie, no srv/cli split)';
198 XXX FIXME: This is being added to b_size as a low-risk fix to the
199 fact that the LVB filling happens _after_ the lock has been granted,
200 so another thread can match it before the LVB has been updated. As
201 a dirty hack, we set LDLM_FL_LVB_READY only after we've done the LVB
202 poop. this is only needed on LOV/OSC now, where LVB is actually
203 used and callers must set it in input flags.
205 The proper fix is to do the granting inside of the completion AST,
206 which can be replaced with a LVB-aware wrapping function for OSC
207 locks. That change is pretty high-risk, though, and would need a
216 A lock contributes to the known minimum size (KMS) calculation until
217 it has finished the part of its cancelation that performs write back
218 on its dirty pages. It can remain on the granted list during this
219 whole time. Threads racing to update the KMS after performing their
220 writeback need to know to exclude each other's locks from the
221 calculation as they walk the granted list.
228 f-desc = 'completion AST to be executed';
234 f-desc = 'cleanup_resource has already handled the lock';
239 f-mask = local_only, hide_lock;
241 optimization hint: LDLM can run blocking callback from current context
242 w/o involving separate thread. in order to decrease cs rate
250 It may happen that a client initiates two operations, e.g. unlink
251 and mkdir, such that the server sends a blocking AST for conflicting
252 locks to this client for the first operation, whereas the second
253 operation has canceled this lock and is waiting for rpc_lock which
254 is taken by the first operation. LDLM_FL_BL_AST is set by
255 ldlm_callback_handler() in the lock to prevent the Early Lock Cancel
256 (ELC) code from cancelling it.
258 LDLM_FL_BL_DONE is to be set by ldlm_cancel_callback() when lock
259 cache is dropped to let ldlm_callback_handler() return EINVAL to the
260 server. It is used when ELC RPC is already prepared and is waiting
261 for rpc_lock, too late to send a separate CANCEL RPC.
268 f-desc = 'whatever it might mean';
275 Don't put lock into the LRU list, so that it is not canceled due to
276 aging. Used by MGC locks, they are cancelled only at unmount or by
282 f-name = fail_notified;
283 f-mask = local_only, gone;
285 Set for locks that failed and where the server has been notified.
287 Protected by lock and resource locks.
293 f-mask = local_only, gone;
295 Set for locks that were removed from class hash table and will be
296 destroyed when last reference to them is released. Set by
297 ldlm_lock_destroy_internal().
299 Protected by lock and resource locks.
304 f-name = server_lock;
306 f-desc = 'flag whether this is a server namespace lock';
313 It's set in lock_res_and_lock() and unset in unlock_res_and_lock().
315 NB: compared with check_res_locked(), checking this bit is cheaper.
316 Also, spin_is_locked() is deprecated for kernel code; one reason is
317 because it works only for SMP so user needs to add extra macros like
318 LASSERT_SPIN_LOCKED for uniprocessor kernels.
326 It's set once we call ldlm_add_waiting_lock_res_locked()
327 to start the lock-timeout timer and it will never be reset.
329 Protected by lock and resource locks.
336 f-desc = 'Flag whether this is a server namespace lock.';
342 f-desc = 'Flag whether this lock can be reused. Used by exclusive open.';