mdd_procfs_init() initializes obd->obd_vars of not mdd's obd, but
mdt's one. Having mdd's obd->obd_vars uninitialized leads conf_param
to fail on setting mdd' parametes.
Xyratex-bug-id: MRP-2277
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Change-Id: I065dc9e4577816ce08f22787116fae4f7e971db5
Reviewed-on: http://review.whamcloud.com/12980
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
static int mdd_init0(const struct lu_env *env, struct mdd_device *mdd,
struct lu_device_type *t, struct lustre_cfg *lcfg)
{
static int mdd_init0(const struct lu_env *env, struct mdd_device *mdd,
struct lu_device_type *t, struct lustre_cfg *lcfg)
{
+ int rc = -EINVAL;
+ const char *dev;
+ 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));
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));
RETURN(rc);
mdd->mdd_atime_diff = MAX_ATIME_DIFF;
RETURN(rc);
mdd->mdd_atime_diff = MAX_ATIME_DIFF;
int mdd_procfs_init(struct mdd_device *mdd, const char *name)
{
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;
struct obd_type *type;
int rc;
ENTRY;
error_noexit "Setting \"lov.stripesize\""
return 1
}
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 || {
if [ "$ff_convert" != "no" -a $(facet_fstype ost1) == "ldiskfs" ]; then
$r $LCTL lfsck_start -M $fsname-OST0000 || {