Whamcloud - gitweb
Constify instances of struct lsm_operations.
authornikita <nikita>
Sat, 18 Oct 2008 17:12:24 +0000 (17:12 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 17:12:24 +0000 (17:12 +0000)
b=16450

lustre/ChangeLog
lustre/include/obd.h
lustre/lov/lov_ea.c

index e601ff3..ba62a48 100644 (file)
@@ -1585,7 +1585,12 @@ Severity   : minor
 Bugzilla   : 16450
 Description: Add loi_kms_set().
 Details    : Wrap kms updates into a helper function.
-       
+
+Severity   : minor
+Bugzilla   : 16450
+Description: Constify instances of struct lsm_operations.
+Details    : Constify instances of struct lsm_operations.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index cef96db..ebddaa2 100644 (file)
@@ -1574,10 +1574,10 @@ struct lsm_operations {
                              struct lov_mds_md *lmm);
 };
 
-extern struct lsm_operations lsm_v1_ops;
-extern struct lsm_operations lsm_join_ops;
-extern struct lsm_operations lsm_v3_ops;
-static inline struct lsm_operations *lsm_op_find(int magic)
+extern const struct lsm_operations lsm_v1_ops;
+extern const struct lsm_operations lsm_join_ops;
+extern const struct lsm_operations lsm_v3_ops;
+static inline const struct lsm_operations *lsm_op_find(int magic)
 {
         switch(magic) {
         case LOV_MAGIC_V1:
index f403660..457d9dc 100755 (executable)
@@ -255,7 +255,7 @@ int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm,
         return 0;
 }
 
-struct lsm_operations lsm_v1_ops = {
+const struct lsm_operations lsm_v1_ops = {
         .lsm_free            = lsm_free_plain,
         .lsm_destroy         = lsm_destroy_plain,
         .lsm_stripe_by_index    = lsm_stripe_by_index_plain,
@@ -619,7 +619,7 @@ out:
         RETURN(rc);
 }
 
-struct lsm_operations lsm_join_ops = {
+const struct lsm_operations lsm_join_ops = {
         .lsm_free             = lsm_free_join,
         .lsm_destroy          = lsm_destroy_join,
         .lsm_stripe_by_index  = lsm_stripe_by_index_join,
@@ -694,7 +694,7 @@ int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm,
         return 0;
 }
 
-struct lsm_operations lsm_v3_ops = {
+const struct lsm_operations lsm_v3_ops = {
         .lsm_free            = lsm_free_plain,
         .lsm_destroy         = lsm_destroy_plain,
         .lsm_stripe_by_index    = lsm_stripe_by_index_plain,