Whamcloud - gitweb
LU-4300 ldlm: ELC picks locks in a safer policy
[fs/lustre-release.git] / lustre / include / lustre_dlm.h
index 22d32f4..bd3e589 100644 (file)
@@ -279,7 +279,7 @@ typedef int (*ldlm_res_policy)(struct ldlm_namespace *, struct ldlm_lock **,
                               void *req_cookie, ldlm_mode_t mode, __u64 flags,
                               void *data);
 
-typedef int (*ldlm_cancel_for_recovery)(struct ldlm_lock *lock);
+typedef int (*ldlm_cancel_cbt)(struct ldlm_lock *lock);
 
 /**
  * LVB operations.
@@ -500,8 +500,11 @@ struct ldlm_namespace {
        /** Limit of parallel AST RPC count. */
        unsigned                ns_max_parallel_ast;
 
-       /** Callback to cancel locks before replaying it during recovery. */
-       ldlm_cancel_for_recovery ns_cancel_for_recovery;
+       /**
+        * Callback to check if a lock is good to be canceled by ELC or
+        * during recovery.
+        */
+       ldlm_cancel_cbt         ns_cancel;
 
        /** LDLM lock stats */
        struct lprocfs_stats    *ns_stats;
@@ -558,10 +561,10 @@ static inline int ns_connect_lru_resize(struct ldlm_namespace *ns)
 }
 
 static inline void ns_register_cancel(struct ldlm_namespace *ns,
-                                      ldlm_cancel_for_recovery arg)
+                                     ldlm_cancel_cbt arg)
 {
-        LASSERT(ns != NULL);
-        ns->ns_cancel_for_recovery = arg;
+       LASSERT(ns != NULL);
+       ns->ns_cancel = arg;
 }
 
 struct ldlm_lock;