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;
13 Server placed lock on granted list, or a recovering client wants
14 the lock added to the granted list, no questions asked.
20 f-mask = on_wire, blocked;
22 Server placed lock on conv list, or a recovering client wants the lock
23 added to the conv list, no questions asked.
29 f-mask = on_wire, blocked;
31 Server placed lock on wait list, or a recovering client wants
32 the lock added to the wait list, no questions asked.
41 f-desc = 'blocking or cancel packet was queued for sending.';
44 // Skipped bits 6 and 7
50 Lock is being replayed. This could probably be implied by the fact that
51 one of BLOCK_{GRANTED,CONV,WAIT} is set, but that is pretty dangerous.
58 f-desc = "Don't grant lock, just do intent.";
61 // Skipped bits 10 and 11
66 f-desc = 'lock request has intent';
69 // Skipped bits 13, 14
72 f-name = flock_deadlock;
73 f-mask = on_wire, ast;
74 f-desc = 'flock deadlock detected';
78 f-name = discard_data;
80 f-desc = 'discard (no writeback) on cancel';
86 f-desc = 'Blocked by group lock - wait indefinitely';
90 f-name = block_nowait;
93 Server told not to wait if blocked. For AGL, OST will not send
101 f-desc = 'return blocking lock';
104 // Skipped bits 20, 21, and 22
107 f-name = cancel_on_block;
108 f-mask = on_wire, inherit;
110 Immediatelly cancel such locks when they block some other locks. Send
111 cancel notification to original lock holder, but expect no reply. This is
112 for clients (like liblustre) that cannot be expected to reliably response
117 // Skipped bits 24 through 29
120 f-name = deny_on_contention;
122 f-desc = 'measure lock contention and return -EUSERS if locking contention '
127 f-name = ast_discard_data;
128 f-mask = on_wire, ast;
130 These are flags that are mapped into the flags and ASTs of blocking locks
131 Add FL_DISCARD to blocking ASTs
139 Used for marking lock as a target for -EINTR while cp_ast sleep
140 emulation + race with upcoming bl_ast.
148 Used while processing the unused list to know that we have already
149 handled this lock and decided to skip it.
156 f-mask = off_wire /* , hide_lock */;
157 f-desc = 'this lock is being destroyed';
161 f-name = wait_noreproc;
163 f-desc = 'not a real flag, not saved in lock';
169 f-desc = 'cancellation callback already run';
174 f-mask = off_wire /* , hide_lock */;
175 f-desc = 'whatever it might mean -- never transmitted?';
180 f-mask = off_wire, gone /* , hide_lock */;
181 f-desc = "don't run the cancel callback under ldlm_cli_cancel_unused";
187 f-desc = 'lock cancel has already been sent';
193 f-desc = 'local lock (ie, no srv/cli split)';
200 XXX FIXME: This is being added to b_size as a low-risk fix to the
201 fact that the LVB filling happens _after_ the lock has been granted,
202 so another thread can match it before the LVB has been updated. As
203 a dirty hack, we set LDLM_FL_LVB_READY only after we've done the LVB
204 poop. this is only needed on LOV/OSC now, where LVB is actually
205 used and callers must set it in input flags.
207 The proper fix is to do the granting inside of the completion AST,
208 which can be replaced with a LVB-aware wrapping function for OSC
209 locks. That change is pretty high-risk, though, and would need a
218 A lock contributes to the known minimum size (KMS) calculation until
219 it has finished the part of its cancelation that performs write back
220 on its dirty pages. It can remain on the granted list during this
221 whole time. Threads racing to update the KMS after performing their
222 writeback need to know to exclude each other's locks from the
223 calculation as they walk the granted list.
230 f-desc = 'completion AST to be executed';
236 f-desc = 'cleanup_resource has already handled the lock';
241 f-mask = off_wire /* , hide_lock */;
243 optimization hint: LDLM can run blocking callback from current context
244 w/o involving separate thread. in order to decrease cs rate
252 It may happen that a client initiates two operations, e.g. unlink
253 and mkdir, such that the server sends a blocking AST for conflicting
254 locks to this client for the first operation, whereas the second
255 operation has canceled this lock and is waiting for rpc_lock which
256 is taken by the first operation. LDLM_FL_BL_AST is set by
257 ldlm_callback_handler() in the lock to prevent the Early Lock Cancel
258 (ELC) code from cancelling it.
266 Set by ldlm_cancel_callback() when lock cache is dropped to let
267 ldlm_callback_handler() return EINVAL to the server. It is used when
268 ELC RPC is already prepared and is waiting for rpc_lock, too late to
269 send a separate CANCEL RPC.
277 Don't put lock into the LRU list, so that it is not canceled due to
278 aging. Used by MGC locks, they are cancelled only at unmount or by
284 f-name = fail_notified;
285 f-mask = off_wire, gone;
287 Set for locks that failed and where the server has been notified.
289 Protected by lock and resource locks.
295 f-mask = off_wire, gone;
297 Set for locks that were removed from class hash table and will be
298 destroyed when last reference to them is released. Set by
299 ldlm_lock_destroy_internal().
301 Protected by lock and resource locks.
306 f-name = server_lock;
308 f-desc = 'flag whether this is a server namespace lock';
315 It's set in lock_res_and_lock() and unset in unlock_res_and_lock().
317 NB: compared with check_res_locked(), checking this bit is cheaper.
318 Also, spin_is_locked() is deprecated for kernel code; one reason is
319 because it works only for SMP so user needs to add extra macros like
320 LASSERT_SPIN_LOCKED for uniprocessor kernels.
328 It's set once we call ldlm_add_waiting_lock_res_locked()
329 to start the lock-timeout timer and it will never be reset.
331 Protected by lock and resource locks.
338 f-desc = 'Flag whether this is a server namespace lock.';
344 f-desc = 'Flag whether this lock can be reused. Used by exclusive open.';