Whamcloud - gitweb
constification
authornikita <nikita>
Sat, 27 May 2006 17:42:43 +0000 (17:42 +0000)
committernikita <nikita>
Sat, 27 May 2006 17:42:43 +0000 (17:42 +0000)
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c

index f68fca4..98b5044 100644 (file)
@@ -467,13 +467,14 @@ void ldlm_put_ref(int force);
 /* ldlm_lock.c */
 ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res);
 void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg);
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *, int flags);
+void ldlm_lock2handle(const struct ldlm_lock *lock,
+                      struct lustre_handle *lockh);
+struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *, int flags);
 void ldlm_cancel_callback(struct ldlm_lock *);
 int ldlm_lock_set_data(struct lustre_handle *, void *data);
 void ldlm_lock_remove_from_lru(struct ldlm_lock *);
 struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *,
-                                      struct lustre_handle *);
+                                      const struct lustre_handle *);
 
 static inline struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *h)
 {
index f9f6c43..7e7c000 100644 (file)
@@ -19,7 +19,8 @@ void ldlm_grant_lock(struct ldlm_lock *lock, void *data, int datalen,
                      int run_ast);
 struct ldlm_lock *
 ldlm_lock_create(struct ldlm_namespace *ns,
-                 struct lustre_handle *parent_lock_handle, struct ldlm_res_id,
+                 const struct lustre_handle *parent_lock_handle,
+                 const struct ldlm_res_id,
                  ldlm_type_t type, ldlm_mode_t, ldlm_blocking_callback,
                  ldlm_completion_callback, ldlm_glimpse_callback, void *data,
                  __u32 lvb_len);
index e3df674..06ac10c 100644 (file)
@@ -316,7 +316,7 @@ int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
  *  HANDLES
  */
 
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
+void ldlm_lock2handle(const struct ldlm_lock *lock, struct lustre_handle *lockh)
 {
         lockh->cookie = lock->l_handle.h_cookie;
 }
@@ -325,7 +325,8 @@ void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
  *           Return NULL if flag already set
  */
 
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *handle, int flags)
+struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
+                                     int flags)
 {
         struct ldlm_namespace *ns;
         struct ldlm_lock *lock = NULL, *retval = NULL;
@@ -367,7 +368,7 @@ struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *handle, int flags)
 }
 
 struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *ns,
-                                      struct lustre_handle *handle)
+                                      const struct lustre_handle *handle)
 {
         struct ldlm_lock *retval = NULL;
 
@@ -789,8 +790,9 @@ int ldlm_lock_match(struct ldlm_namespace *ns, int flags,
 
 /* Returns a referenced lock */
 struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
-                                   struct lustre_handle *parent_lock_handle,
-                                   struct ldlm_res_id res_id, ldlm_type_t type,
+                                   const struct lustre_handle *parent_lock_handle,
+                                   const struct ldlm_res_id res_id,
+                                   ldlm_type_t type,
                                    ldlm_mode_t mode,
                                    ldlm_blocking_callback blocking,
                                    ldlm_completion_callback completion,
index 274fe33..74f635b 100644 (file)
@@ -633,7 +633,8 @@ int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data)
 }
 
 static struct ldlm_lock *
-find_existing_lock(struct obd_export *exp, struct lustre_handle *remote_hdl)
+find_existing_lock(struct obd_export *exp,
+                   const struct lustre_handle *remote_hdl)
 {
         struct obd_device *obd = exp->exp_obd;
         struct list_head *iter;