Whamcloud - gitweb
Revert "LU-2459 osd: add LMA incompat flag check"
[fs/lustre-release.git] / lustre / ldlm / ldlm_internal.h
index f0a114a..55483e9 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -62,11 +62,6 @@ static inline struct mutex *ldlm_namespace_lock(ldlm_side_t client)
 }
 
 /* ldlm_request.c */
-typedef enum {
-        LDLM_ASYNC,
-        LDLM_SYNC,
-} ldlm_sync_t;
-
 /* Cancel lru flag, it indicates we cancel aged locks. */
 enum {
         LDLM_CANCEL_AGED   = 1 << 0, /* Cancel aged locks (non lru resize). */
@@ -77,8 +72,8 @@ enum {
                                       * sending nor waiting for any rpcs) */
 };
 
-int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync,
-                    int flags);
+int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
+                   ldlm_cancel_flags_t sync, int flags);
 int ldlm_cancel_lru_local(struct ldlm_namespace *ns,
                           cfs_list_t *cancels, int count, int max,
                           ldlm_cancel_flags_t cancel_flags, int flags);
@@ -110,11 +105,13 @@ typedef enum {
 } ldlm_desc_ast_t;
 
 void ldlm_grant_lock(struct ldlm_lock *lock, cfs_list_t *work_list);
+int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
+                 enum req_location loc, void *data, int size);
 struct ldlm_lock *
 ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *,
                  ldlm_type_t type, ldlm_mode_t,
                  const struct ldlm_callback_suite *cbs,
-                 void *data, __u32 lvb_len);
+                void *data, __u32 lvb_len, enum lvb_type lvb_type);
 ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
                               void *cookie, __u64 *flags);
 void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
@@ -142,8 +139,10 @@ void ldlm_cancel_locks_for_export(struct obd_export *export);
 /* 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,
-                           cfs_list_t *cancels, int count, int mode);
+int ldlm_bl_to_thread_list(struct ldlm_namespace *ns,
+                          struct ldlm_lock_desc *ld,
+                          cfs_list_t *cancels, int count,
+                          ldlm_cancel_flags_t cancel_flags);
 
 void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
                              struct ldlm_lock_desc *ld, struct ldlm_lock *lock);