Whamcloud - gitweb
Cleanup Compiler Warnings(Patch by Robert Read)
[fs/lustre-release.git] / lustre / include / lustre_dlm.h
index 5d2941c..06b5a7b 100644 (file)
@@ -172,9 +172,9 @@ static inline void lockmode_verify(ldlm_mode_t mode)
        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);
 }
 
 /*
@@ -429,6 +429,8 @@ struct ldlm_namespace {
          * 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)
@@ -549,6 +551,10 @@ struct ldlm_lock {
         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 */
 
@@ -614,9 +620,9 @@ struct ldlm_ast_work {
 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. */
 };
 
@@ -777,6 +783,8 @@ void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode);
 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,