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 and 15
70 f-name = discard_data;
72 f-desc = 'discard (no writeback) on cancel';
78 f-desc = 'Blocked by group lock - wait indefinitely';
82 f-name = block_nowait;
85 Server told not to wait if blocked. For AGL, OST will not send
93 f-desc = 'return blocking lock';
96 // Skipped bits 20, 21, and 22
99 f-name = cancel_on_block;
100 f-mask = on_wire, inherit;
102 Immediatelly cancel such locks when they block some other locks. Send
103 cancel notification to original lock holder, but expect no reply. This is
104 for clients (like liblustre) that cannot be expected to reliably response
109 // Skipped bits 24 through 29
112 f-name = deny_on_contention;
114 f-desc = 'measure lock contention and return -EUSERS if locking contention '
119 f-name = ast_discard_data;
120 f-mask = on_wire, ast;
122 These are flags that are mapped into the flags and ASTs of blocking locks
123 Add FL_DISCARD to blocking ASTs
131 Used for marking lock as a target for -EINTR while cp_ast sleep
132 emulation + race with upcoming bl_ast.
140 Used while processing the unused list to know that we have already
141 handled this lock and decided to skip it.
148 f-mask = local_only, hide_lock;
149 f-desc = 'this lock is being destroyed';
153 f-name = wait_noreproc;
155 f-desc = 'not a real flag, not saved in lock';
161 f-desc = 'cancellation callback already run';
166 f-mask = local_only, hide_lock;
167 f-desc = 'whatever it might mean';
172 f-mask = local_only, gone, hide_lock;
173 f-desc = "don't run the cancel callback under ldlm_cli_cancel_unused";
179 f-desc = 'lock cancel has already been sent';
185 f-desc = 'local lock (ie, no srv/cli split)';
192 XXX FIXME: This is being added to b_size as a low-risk fix to the
193 fact that the LVB filling happens _after_ the lock has been granted,
194 so another thread can match it before the LVB has been updated. As
195 a dirty hack, we set LDLM_FL_LVB_READY only after we've done the LVB
196 poop. this is only needed on LOV/OSC now, where LVB is actually
197 used and callers must set it in input flags.
199 The proper fix is to do the granting inside of the completion AST,
200 which can be replaced with a LVB-aware wrapping function for OSC
201 locks. That change is pretty high-risk, though, and would need a
210 A lock contributes to the known minimum size (KMS) calculation until
211 it has finished the part of its cancelation that performs write back
212 on its dirty pages. It can remain on the granted list during this
213 whole time. Threads racing to update the KMS after performing their
214 writeback need to know to exclude each other's locks from the
215 calculation as they walk the granted list.
222 f-desc = 'completion AST to be executed';
228 f-desc = 'cleanup_resource has already handled the lock';
233 f-mask = local_only, hide_lock;
235 optimization hint: LDLM can run blocking callback from current context
236 w/o involving separate thread. in order to decrease cs rate
244 It may happen that a client initiates two operations, e.g. unlink
245 and mkdir, such that the server sends a blocking AST for conflicting
246 locks to this client for the first operation, whereas the second
247 operation has canceled this lock and is waiting for rpc_lock which
248 is taken by the first operation. LDLM_FL_BL_AST is set by
249 ldlm_callback_handler() in the lock to prevent the Early Lock Cancel
250 (ELC) code from cancelling it.
252 LDLM_FL_BL_DONE is to be set by ldlm_cancel_callback() when lock
253 cache is dropped to let ldlm_callback_handler() return EINVAL to the
254 server. It is used when ELC RPC is already prepared and is waiting
255 for rpc_lock, too late to send a separate CANCEL RPC.
262 f-desc = 'whatever it might mean';
269 Don't put lock into the LRU list, so that it is not canceled due to
270 aging. Used by MGC locks, they are cancelled only at unmount or by
276 f-name = fail_notified;
277 f-mask = local_only, gone;
279 Set for locks that failed and where the server has been notified.
281 Protected by lock and resource locks.
287 f-mask = local_only, gone;
289 Set for locks that were removed from class hash table and will be
290 destroyed when last reference to them is released. Set by
291 ldlm_lock_destroy_internal().
293 Protected by lock and resource locks.
298 f-name = server_lock;
300 f-desc = 'flag whether this is a server namespace lock';
307 It's set in lock_res_and_lock() and unset in unlock_res_and_lock().
309 NB: compared with check_res_locked(), checking this bit is cheaper.
310 Also, spin_is_locked() is deprecated for kernel code; one reason is
311 because it works only for SMP so user needs to add extra macros like
312 LASSERT_SPIN_LOCKED for uniprocessor kernels.
320 It's set once we call ldlm_add_waiting_lock_res_locked()
321 to start the lock-timeout timer and it will never be reset.
323 Protected by lock and resource locks.
330 f-desc = 'Flag whether this is a server namespace lock.';
336 f-desc = 'Flag whether this lock can be reused. Used by exclusive open.';