if (rc)
GOTO(err_llog, rc);
+ mds_changelog_llog_init(obd, obd);
+
if (mds->mds_profile) {
struct lustre_profile *lprof;
/* The profile defines which osc and mdc to connect to, for a
static int mds_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
{
- int rc = 0;
struct mds_obd *mds = &obd->u.mds;
+ struct llog_ctxt *ctxt;
+ int rc = 0;
ENTRY;
switch (stage) {
down_write(&mds->mds_notify_lock);
mds_lov_disconnect(obd);
mds_lov_clean(obd);
- llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
- llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT));
+ ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
+ ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
rc = obd_llog_finish(obd, 0);
mds->mds_osc_exp = NULL;
up_write(&mds->mds_notify_lock);
if (rc)
GOTO(err_objects, rc);
- mds->mds_max_mdsize = sizeof(struct lov_mds_md_v3);
- mds->mds_max_cookiesize = sizeof(struct llog_cookie);
-
err_pop:
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
RETURN(rc);
LCONSOLE_WARN("%s: shutting down for failover; client state "
"will be preserved.\n", obd->obd_name);
+ if (strncmp(obd->obd_name, MDD_OBD_NAME, strlen(MDD_OBD_NAME)))
+ RETURN(0);
+
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
mds_lov_destroy_objids(obd);