Whamcloud - gitweb
update CMM code after code review
authortappro <tappro>
Sat, 17 Jun 2006 16:01:04 +0000 (16:01 +0000)
committertappro <tappro>
Sat, 17 Jun 2006 16:01:04 +0000 (16:01 +0000)
lustre/cmm/cmm_device.c
lustre/cmm/cmm_object.c
lustre/cmm/mdc_device.c

index ffbdadf..c43d1c5 100644 (file)
@@ -207,6 +207,7 @@ static void cmm_device_free(const struct lu_context *ctx, struct lu_device *d)
         struct cmm_device *m = lu2cmm_dev(d);
 
        LASSERT(atomic_read(&d->ld_ref) == 0);
+        LASSERT(m->cmm_tgt_count == 0);
        md_device_fini(&m->cmm_md_dev);
         OBD_FREE_PTR(m);
 }
@@ -262,6 +263,7 @@ static struct lu_device *cmm_device_fini(const struct lu_context *ctx,
                 lu_device_put(cmm2lu_dev(cm));
                 ld->ld_type->ldt_ops->ldto_device_fini(ctx, ld_m);
                 ld->ld_type->ldt_ops->ldto_device_free(ctx, ld_m);
+                cm->cmm_tgt_count--;
         }
 
         EXIT;
@@ -312,7 +314,7 @@ static void __exit cmm_mod_exit(void)
 }
 
 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Clustered Meta-data Manager Prototype ("LUSTRE_CMM0_NAME")");
+MODULE_DESCRIPTION("Lustre Clustered Metadata Manager ("LUSTRE_CMM0_NAME")");
 MODULE_LICENSE("GPL");
 
-cfs_module(cmm, "0.0.3", cmm_mod_init, cmm_mod_exit);
+cfs_module(cmm, "0.1.0", cmm_mod_init, cmm_mod_exit);
index 41db691..7d16746 100644 (file)
@@ -548,7 +548,7 @@ static int cmr_create(const struct lu_context *ctx,
 
         ENTRY;
 
-        //TODO: check the name isn't exist
+        //XXX: make sure that MDT checks name isn't exist
 
         /* remote object creation and local name insert */
         rc = mo_object_create(ctx, cmm2child_obj(md2cmm_obj(mo_c)), attr);
@@ -566,7 +566,7 @@ static int cmr_link(const struct lu_context *ctx, struct md_object *mo_p,
         int rc;
         ENTRY;
 
-        //TODO: check the name isn't exist
+        //XXX: make sure that MDT checks name isn't exist
 
         rc = mo_ref_add(ctx, cmm2child_obj(md2cmm_obj(mo_s)));
         if (rc == 0) {
@@ -608,7 +608,7 @@ static int cmr_rename(const struct lu_context *ctx, struct md_object *mo_po,
         rc = mdo_rename_tgt(ctx, c_pn, NULL/* mo_t */, lf, t_name);
         /* only old name is removed localy */
         if (rc == 0) 
-                rc = mdo_name_destroy(ctx, c_po, s_name); 
+                rc = mdo_name_remove(ctx, c_po, s_name); 
 
         RETURN(rc);
 }
index 41a20ff..d3e943c 100644 (file)
@@ -149,7 +149,7 @@ static struct lu_device *mdc_device_fini(const struct lu_context *ctx,
                                          struct lu_device *ld)
 {
        struct mdc_device *mc = lu2mdc_dev(ld);
-        //TODO: disconnect from MDC OBD, finalize all other things.
+
         ENTRY;
 
         mdc_del_obd(mc);