Whamcloud - gitweb
b=22671 Check for modules directly instead of keeping state
[fs/lustre-release.git] / lustre / cmm / cmm_object.c
index 281dc0c..c9301cf 100644 (file)
@@ -160,7 +160,7 @@ static void cml_object_free(const struct lu_env *env,
 }
 
 static int cml_object_init(const struct lu_env *env, struct lu_object *lo,
-                           const struct lu_object_conf *_)
+                           const struct lu_object_conf *unused)
 {
         struct cmm_device *cd = lu2cmm_dev(lo->lo_dev);
         struct lu_device  *c_dev;
@@ -801,14 +801,14 @@ static struct lu_device *cmr_child_dev(struct cmm_device *d, __u32 num)
         struct lu_device *next = NULL;
         struct mdc_device *mdc;
 
-        spin_lock(&d->cmm_tgt_guard);
-        list_for_each_entry(mdc, &d->cmm_targets, mc_linkage) {
+        cfs_spin_lock(&d->cmm_tgt_guard);
+        cfs_list_for_each_entry(mdc, &d->cmm_targets, mc_linkage) {
                 if (mdc->mc_num == num) {
                         next = mdc2lu_dev(mdc);
                         break;
                 }
         }
-        spin_unlock(&d->cmm_tgt_guard);
+        cfs_spin_unlock(&d->cmm_tgt_guard);
         return next;
 }
 
@@ -822,7 +822,7 @@ static void cmr_object_free(const struct lu_env *env,
 }
 
 static int cmr_object_init(const struct lu_env *env, struct lu_object *lo,
-                           const struct lu_object_conf *_)
+                           const struct lu_object_conf *unused)
 {
         struct cmm_device *cd = lu2cmm_dev(lo->lo_dev);
         struct lu_device  *c_dev;
@@ -970,13 +970,15 @@ static int cmr_object_sync(const struct lu_env *env, struct md_object *mo)
 static dt_obj_version_t cmr_version_get(const struct lu_env *env,
                                         struct md_object *mo)
 {
-        LBUG();
+        /* Don't check remote object version */
+        return 0;
 }
 
 static void cmr_version_set(const struct lu_env *env, struct md_object *mo,
                             dt_obj_version_t version)
 {
-        LBUG();
+        /* No need to update remote object version here, it is done as a part
+         * of reintegration of partial operation on the remote server */
 }
 
 static const struct md_object_operations cmr_mo_ops = {