/* ldlm_lock.c */
ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res);
void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg);
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *, int flags);
+void ldlm_lock2handle(const struct ldlm_lock *lock,
+ struct lustre_handle *lockh);
+struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *, int flags);
void ldlm_cancel_callback(struct ldlm_lock *);
int ldlm_lock_set_data(struct lustre_handle *, void *data);
void ldlm_lock_remove_from_lru(struct ldlm_lock *);
struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *,
- struct lustre_handle *);
+ const struct lustre_handle *);
static inline struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *h)
{
int run_ast);
struct ldlm_lock *
ldlm_lock_create(struct ldlm_namespace *ns,
- struct lustre_handle *parent_lock_handle, struct ldlm_res_id,
+ const struct lustre_handle *parent_lock_handle,
+ const struct ldlm_res_id,
ldlm_type_t type, ldlm_mode_t, ldlm_blocking_callback,
ldlm_completion_callback, ldlm_glimpse_callback, void *data,
__u32 lvb_len);
* HANDLES
*/
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
+void ldlm_lock2handle(const struct ldlm_lock *lock, struct lustre_handle *lockh)
{
lockh->cookie = lock->l_handle.h_cookie;
}
* Return NULL if flag already set
*/
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *handle, int flags)
+struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
+ int flags)
{
struct ldlm_namespace *ns;
struct ldlm_lock *lock = NULL, *retval = NULL;
}
struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *ns,
- struct lustre_handle *handle)
+ const struct lustre_handle *handle)
{
struct ldlm_lock *retval = NULL;
/* Returns a referenced lock */
struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
- struct lustre_handle *parent_lock_handle,
- struct ldlm_res_id res_id, ldlm_type_t type,
+ const struct lustre_handle *parent_lock_handle,
+ const struct ldlm_res_id res_id,
+ ldlm_type_t type,
ldlm_mode_t mode,
ldlm_blocking_callback blocking,
ldlm_completion_callback completion,
}
static struct ldlm_lock *
-find_existing_lock(struct obd_export *exp, struct lustre_handle *remote_hdl)
+find_existing_lock(struct obd_export *exp,
+ const struct lustre_handle *remote_hdl)
{
struct obd_device *obd = exp->exp_obd;
struct list_head *iter;