Whamcloud - gitweb
b=14230
[fs/lustre-release.git] / lustre / cmm / mdc_device.c
index 9ecc428..3328740 100644 (file)
@@ -138,7 +138,7 @@ static int mdc_obd_add(const struct lu_env *env,
                                          OBD_CONNECT_IBITS |
                                          OBD_CONNECT_MDS_MDS |
                                          OBD_CONNECT_FID;
-                rc = obd_connect(env, conn, mdc, &mdc->obd_uuid, ocd);
+                rc = obd_connect(env, conn, mdc, &mdc->obd_uuid, ocd, NULL);
                 OBD_FREE_PTR(ocd);
                 if (rc) {
                         CERROR("target %s connect error %d\n",
@@ -235,7 +235,7 @@ static struct lu_device_operations mdc_lu_ops = {
         .ldo_process_config = mdc_process_config
 };
 
-void mdc_init_ea_size(const struct lu_env *env, struct mdc_device *mc, 
+void cmm_mdc_init_ea_size(const struct lu_env *env, struct mdc_device *mc,
                       int max_mdsize, int max_cookiesize)
 {
         struct obd_device *obd = class_exp2obd(mc->mc_desc.cl_exp);
@@ -257,9 +257,9 @@ static struct lu_device *mdc_device_fini(const struct lu_env *env,
         RETURN (NULL);
 }
 
-struct lu_device *mdc_device_alloc(const struct lu_env *env,
-                                   struct lu_device_type *ldt,
-                                   struct lustre_cfg *cfg)
+static struct lu_device *mdc_device_alloc(const struct lu_env *env,
+                                          struct lu_device_type *ldt,
+                                          struct lustre_cfg *cfg)
 {
         struct lu_device  *ld;
         struct mdc_device *mc;
@@ -279,15 +279,18 @@ struct lu_device *mdc_device_alloc(const struct lu_env *env,
 
         RETURN (ld);
 }
-void mdc_device_free(const struct lu_env *env, struct lu_device *ld)
+
+static struct lu_device *mdc_device_free(const struct lu_env *env,
+                                         struct lu_device *ld)
 {
         struct mdc_device *mc = lu2mdc_dev(ld);
 
        LASSERTF(atomic_read(&ld->ld_ref) == 0,
                  "Refcount = %i\n", atomic_read(&ld->ld_ref));
         LASSERT(list_empty(&mc->mc_linkage));
-       md_device_fini(&mc->mc_md_dev);
+        md_device_fini(&mc->mc_md_dev);
         OBD_FREE_PTR(mc);
+        return NULL;
 }
 
 /* context key constructor/destructor: mdc_key_init, mdc_key_fini */