Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / ldlm / ldlm_internal.h
1 /* ldlm_request.c */
2 int ldlm_cancel_lru(struct ldlm_namespace *ns);
3
4 /* ldlm_resource.c */
5 void ldlm_resource_insert_lock_after(struct ldlm_lock *original,
6                                      struct ldlm_lock *new);
7
8 /* ldlm_lock.c */
9 void ldlm_grant_lock(struct ldlm_lock *lock, void *data, int datalen,
10                      int run_ast);
11 struct ldlm_lock *
12 ldlm_lock_create(struct ldlm_namespace *ns,
13                  struct lustre_handle *parent_lock_handle, struct ldlm_res_id,
14                  __u32 type, ldlm_mode_t, ldlm_blocking_callback,
15                  ldlm_completion_callback, ldlm_glimpse_callback, void *data,
16                  __u32 lvb_len);
17 ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
18                                void *cookie, int *flags);
19 void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
20 void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode);
21 void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
22                             void *data, int datalen);
23 int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue);
24 int ldlm_run_ast_work(struct ldlm_namespace *, struct list_head *rpc_list);
25
26 /* ldlm_lockd.c */
27 int ldlm_bl_to_thread(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
28                       struct ldlm_lock *lock);
29
30 /* ldlm_plain.c */
31 int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq,
32                             ldlm_error_t *err);
33
34 /* ldlm_extent.c */
35 int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq,
36                              ldlm_error_t *err);
37
38 /* ldlm_flock.c */
39 int ldlm_process_flock_lock(struct ldlm_lock *lock, int *flags, int first_enq,
40                             ldlm_error_t *err);
41
42 /* ldlm_inodebits.c */
43 int ldlm_process_inodebits_lock(struct ldlm_lock *lock, int *flags,
44                                 int first_enq, ldlm_error_t *err);
45
46 /* l_lock.c */
47 void l_check_no_ns_lock(struct ldlm_namespace *ns);
48
49 extern struct proc_dir_entry *ldlm_svc_proc_dir;
50
51 struct ldlm_state {
52         struct ptlrpc_service *ldlm_cb_service;
53         struct ptlrpc_service *ldlm_cancel_service;
54         struct ptlrpc_client *ldlm_client;
55         struct ptlrpc_connection *ldlm_server_conn;
56         struct ldlm_bl_pool *ldlm_bl_pool;
57 };
58
59 int ldlm_init(void);
60 void ldlm_exit(void);
61