static int mdd_init0(const struct lu_env *env, struct mdd_device *mdd,
struct lu_device_type *t, struct lustre_cfg *lcfg)
{
- int rc;
+ int rc = -EINVAL;
+ const char *dev;
ENTRY;
+ dev = lustre_cfg_string(lcfg, 0);
+ if (dev == NULL)
+ RETURN(rc);
+
+ mdd->mdd_md_dev.md_lu_dev.ld_obd = class_name2obd(dev);
+ if (mdd->mdd_md_dev.md_lu_dev.ld_obd == NULL)
+ RETURN(rc);
mdd->mdd_md_dev.md_lu_dev.ld_ops = &mdd_lu_ops;
mdd->mdd_md_dev.md_ops = &mdd_ops;
rc = mdd_connect_to_next(env, mdd, lustre_cfg_string(lcfg, 3));
- if (rc)
+ if (rc != 0)
RETURN(rc);
mdd->mdd_atime_diff = MAX_ATIME_DIFF;
int mdd_procfs_init(struct mdd_device *mdd, const char *name)
{
- struct obd_device *obd = class_name2obd(name);
+ struct obd_device *obd = mdd2obd_dev(mdd);
struct obd_type *type;
int rc;
ENTRY;
error_noexit "Setting \"lov.stripesize\""
return 1
}
+ $r $LCTL conf_param $fsname-MDT0000.mdd.atime_diff=70 || {
+ error_noexit "Setting \"mdd.atime_diff\""
+ return 1
+ }
if [ "$ff_convert" != "no" -a $(facet_fstype ost1) == "ldiskfs" ]; then
$r $LCTL lfsck_start -M $fsname-OST0000 || {