Whamcloud - gitweb
- fixed a typo.
[fs/lustre-release.git] / lustre / ldlm / ldlm_internal.h
index 2c5335c..5966d4c 100644 (file)
@@ -36,11 +36,19 @@ typedef enum {
 } ldlm_sync_t;
 
 /* Cancel lru flag, it indicates we cancel aged locks. */
-#define LDLM_CANCEL_AGED 0x00000001
+enum {
+        LDLM_CANCEL_AGED   = 1 << 0, /* Cancel aged locks (non lru resize). */
+        LDLM_CANCEL_PASSED = 1 << 1, /* Cancel passed number of locks. */
+        LDLM_CANCEL_SHRINK = 1 << 2, /* Cancel locks from shrinker. */
+        LDLM_CANCEL_LRUR   = 1 << 3  /* Cancel locks from lru resize. */
+};
 
-int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync);
+int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync, 
+                    int flags);
 int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels,
                           int count, int max, int flags);
+extern int ldlm_enqueue_min;
+int ldlm_get_enq_timeout(struct ldlm_lock *lock);
 
 /* ldlm_resource.c */
 int ldlm_resource_putref_locked(struct ldlm_resource *res);
@@ -58,7 +66,7 @@ int ldlm_namespace_free_post(struct ldlm_namespace *ns, int force);
 struct ldlm_cb_set_arg {
         struct ptlrpc_request_set *set;
         atomic_t restart;
-        __u16 type; /* LDLM_BL_CALLBACK or LDLM_CP_CALLBACK */
+        __u32 type; /* LDLM_BL_CALLBACK or LDLM_CP_CALLBACK */
 };
 
 void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list);
@@ -87,11 +95,8 @@ void ldlm_lock_touch_in_lru(struct ldlm_lock *lock);
 void ldlm_lock_destroy_nolock(struct ldlm_lock *lock);
 
 /* ldlm_lockd.c */
-int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct ldlm_lock *lock);
-int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct list_head *cancels, int count);
-
+int ldlm_bl_to_thread(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
+                      struct ldlm_lock *lock, int flags);
 void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
                              struct ldlm_lock_desc *ld, struct ldlm_lock *lock);