LASSERT(mode > LCK_MINMODE && mode < LCK_MAXMODE);
}
-static inline int lockmode_compat(ldlm_mode_t exist, ldlm_mode_t new)
+static inline int lockmode_compat(ldlm_mode_t exist_mode, ldlm_mode_t new_mode)
{
- return (lck_compat_array[exist] & new);
+ return (lck_compat_array[exist_mode] & new_mode);
}
/*
* Backward link to obd, required for ldlm pool to store new SLV.
*/
struct obd_device *ns_obd;
+
+ struct adaptive_timeout ns_at_estimate;/* estimated lock callback time*/
};
static inline int ns_is_client(struct ldlm_namespace *ns)
void *l_lvb_data; /* an LVB received during */
void *l_lvb_swabber; /* an enqueue */
void *l_ast_data;
+ spinlock_t l_extents_list_lock;
+ struct list_head l_extents_list;
+
+ struct list_head l_cache_locks_list;
/* Server-side-only members */
struct ldlm_enqueue_info {
__u32 ei_type; /* Type of the lock being enqueued. */
__u32 ei_mode; /* Mode of the lock being enqueued. */
- void *ei_cb_bl; /* Different callbacks for lock handling (blocking, */
- void *ei_cb_cp; /* completion, glimpse) */
- void *ei_cb_gl;
+ void *ei_cb_bl; /* blocking lock callback */
+ void *ei_cb_cp; /* lock completion callback */
+ void *ei_cb_gl; /* lock glimpse callback */
void *ei_cbdata; /* Data to be passed into callbacks. */
};
void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode);
void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode);
void ldlm_lock_allow_match(struct ldlm_lock *lock);
+int ldlm_lock_fast_match(struct ldlm_lock *, int, obd_off, obd_off, void **);
+void ldlm_lock_fast_release(void *, int);
ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags,
const struct ldlm_res_id *, ldlm_type_t type,
ldlm_policy_data_t *, ldlm_mode_t mode,