Whamcloud - gitweb
b=13766
[fs/lustre-release.git] / lustre / include / lustre_dlm.h
index fc9f390..7789517 100644 (file)
@@ -224,12 +224,6 @@ struct ldlm_pool_ops {
         int (*po_setup)(struct ldlm_pool *pl, int limit);
 };
 
-enum {
-        LDLM_POOL_CTL_RECALC = 1 << 0, /* Pool recalc is enabled */
-        LDLM_POOL_CTL_SHRINK = 1 << 1, /* Pool shrink is enabled */
-        LDLM_POOL_CTL_FULL   = (LDLM_POOL_CTL_RECALC | LDLM_POOL_CTL_SHRINK)
-};
-
 /* One second for pools thread check interval. */
 #define LDLM_POOLS_THREAD_PERIOD (1)
 
@@ -262,26 +256,14 @@ struct ldlm_pool {
                                                   * server was obtained. */
         struct ldlm_pool_ops  *pl_ops;           /* Recalc and shrink ops. */ 
 
-        int                    pl_control;       /* Pool features mask */
-        
-        atomic_t               pl_grant_plan;    /* Planned number of granted 
+        int                    pl_grant_plan;    /* Planned number of granted 
                                                   * locks for next T. */
-        atomic_t               pl_grant_step;    /* Grant plan step for next 
+        int                    pl_grant_step;    /* Grant plan step for next 
                                                   * T. */
 
         struct lprocfs_stats  *pl_stats;         /* Pool statistics. */
 };
 
-static inline int pool_recalc_enabled(struct ldlm_pool *pl)
-{
-        return pl->pl_control & LDLM_POOL_CTL_RECALC;
-}
-
-static inline int pool_shrink_enabled(struct ldlm_pool *pl)
-{
-        return pl->pl_control & LDLM_POOL_CTL_SHRINK;
-}
-
 typedef int (*ldlm_res_policy)(struct ldlm_namespace *, struct ldlm_lock **,
                                void *req_cookie, ldlm_mode_t mode, int flags,
                                void *data);
@@ -664,7 +646,7 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags,
                             ldlm_policy_data_t *, ldlm_mode_t mode,
                             struct lustre_handle *);
 struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
-                                        int *flags);
+                                        __u32 *flags);
 void ldlm_lock_cancel(struct ldlm_lock *lock);
 void ldlm_cancel_locks_for_export(struct obd_export *export);
 void ldlm_reprocess_all(struct ldlm_resource *res);
@@ -726,9 +708,14 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                      ldlm_policy_data_t *policy, int *flags,
                      void *lvb, __u32 lvb_len, void *lvb_swabber,
                      struct lustre_handle *lockh, int async);
-struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp,
-                                             int bufcount, int *size,
-                                             struct list_head *head, int count);
+int ldlm_prep_enqueue_req(struct obd_export *exp,
+                          struct ptlrpc_request *req,
+                          struct list_head *cancels,
+                          int count);
+int ldlm_prep_elc_req(struct obd_export *exp,
+                      struct ptlrpc_request *req,
+                      int version, int opc, int canceloff,
+                      struct list_head *cancels, int count);
 int ldlm_handle_enqueue0(struct ldlm_namespace *ns, struct ptlrpc_request *req,
                          const struct ldlm_request *dlm_req,
                          const struct ldlm_callback_suite *cbs);
@@ -748,7 +735,7 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
                            struct lustre_handle *lockh);
 int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new,
                     void *data, __u32 data_len);
-int ldlm_cli_convert(struct lustre_handle *, int new_mode, int *flags);
+int ldlm_cli_convert(struct lustre_handle *, int new_mode, __u32 *flags);
 int ldlm_cli_update_pool(struct ptlrpc_request *req);
 int ldlm_handle_convert0(struct ptlrpc_request *req,
                          const struct ldlm_request *dlm_req);
@@ -769,7 +756,7 @@ int ldlm_cancel_resource_local(struct ldlm_resource *res,
                                ldlm_mode_t mode, int lock_flags,
                                int cancel_flags, void *opaque);
 int ldlm_cli_cancel_list(struct list_head *head, int count,
-                         struct ptlrpc_request *req, int off, int flags);
+                         struct ptlrpc_request *req, int flags);
  
 /* mds/handler.c */
 /* This has to be here because recursive inclusion sucks. */