mdd->mdd_txn_cb.dtc_txn_stop = mdd_txn_stop_cb;
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);
+ CFS_INIT_LIST_HEAD(&mdd->mdd_txn_cb.dtc_linkage);
+ mdd->mdd_atime_diff = MAX_ATIME_DIFF;
+
rc = mdd_procfs_init(mdd, name);
RETURN(rc);
}
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 = {
/* 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 }
-};
-
-LPROCFS_INIT_VARS(mdd, lprocfs_mdd_module_vars, lprocfs_mdd_obd_vars);
-
static int __init mdd_mod_init(void)
{
struct lprocfs_static_vars lvars;
- lprocfs_init_vars(mdd, &lvars);
+ lprocfs_mdd_init_vars(&lvars);
return class_register_type(&mdd_obd_device_ops, NULL, lvars.module_vars,
LUSTRE_MDD_NAME, &mdd_device_type);
}