Whamcloud - gitweb
b=14340
[fs/lustre-release.git] / lustre / mdd / mdd_device.c
index da978d4..a1a69f5 100644 (file)
@@ -62,6 +62,8 @@ static int mdd_device_init(const struct lu_env *env, struct lu_device *d,
         mdd->mdd_txn_cb.dtc_txn_commit = mdd_txn_commit_cb;
         mdd->mdd_txn_cb.dtc_cookie = mdd;
         INIT_LIST_HEAD(&mdd->mdd_txn_cb.dtc_linkage);
+        mdd->mdd_atime_diff = MAX_ATIME_DIFF;
+
         rc = mdd_procfs_init(mdd, name);
         RETURN(rc);
 }
@@ -315,14 +317,17 @@ static struct lu_device *mdd_device_alloc(const struct lu_env *env,
         return l;
 }
 
-static void mdd_device_free(const struct lu_env *env,
-                            struct lu_device *lu)
+static struct lu_device *mdd_device_free(const struct lu_env *env,
+                                         struct lu_device *lu)
 {
         struct mdd_device *m = lu2mdd_dev(lu);
+        struct lu_device  *next = &m->mdd_child->dd_lu_dev;
+        ENTRY;
 
         LASSERT(atomic_read(&lu->ld_ref) == 0);
         md_device_fini(&m->mdd_md_dev);
         OBD_FREE_PTR(m);
+        RETURN(next);
 }
 
 static struct obd_ops mdd_obd_device_ops = {
@@ -412,20 +417,6 @@ static void mdd_key_fini(const struct lu_context *ctx,
 /* context key: mdd_thread_key */
 LU_CONTEXT_KEY_DEFINE(mdd, LCT_MD_THREAD);
 
-struct lprocfs_vars lprocfs_mdd_obd_vars[] = {
-        { 0 }
-};
-
-struct lprocfs_vars lprocfs_mdd_module_vars[] = {
-        { 0 }
-};
-
-static void lprocfs_mdd_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_mdd_module_vars;
-    lvars->obd_vars     = lprocfs_mdd_obd_vars;
-}
-
 static int __init mdd_mod_init(void)
 {
         struct lprocfs_static_vars lvars;