#define CFG_F_START 0x01 /* Set when we start updating from a log */
#define CFG_F_MARKER 0x02 /* We are within a maker */
#define CFG_F_SKIP 0x04 /* We should ignore this cfg command */
-#define CFG_F_COMPAT146 0x08 /* Allow old-style logs */
#define CFG_F_EXCLUDE 0x10 /* OST exclusion list */
/* Passed as data param to class_config_parse_llog */
/** regenerate config logs for this fs or server */
#define LDD_F_WRITECONF 0x0100
/** COMPAT_14 */
-#define LDD_F_UPGRADE14 0x0200
+/*#define LDD_F_UPGRADE14 0x0200 deprecated since 1.8 */
/** process as lctl conf_param */
#define LDD_F_PARAM 0x0400
/** all nodes are specified as service nodes */
break;
}
- /* COMPAT_146 */
- /* FIXME only set this for old logs! Right now this forces
- us to always skip the "inside markers" check */
- cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146;
-
rc = mgc_process_log(obd, cld);
if (rc == 0 && cld->cld_recover != NULL) {
if (OCD_HAS_FLAG(&obd->u.cli.cl_import->
if (mti->mti_flags & LDD_F_NEED_INDEX)
mti->mti_flags |= LDD_F_WRITECONF;
- if (!(mti->mti_flags & (LDD_F_WRITECONF | LDD_F_UPGRADE14 |
- LDD_F_UPDATE))) {
+ if (!(mti->mti_flags & (LDD_F_WRITECONF | LDD_F_UPDATE))) {
/* We're just here as a startup ping. */
CDEBUG(D_MGS, "Server %s is running on %s\n",
mti->mti_svname, obd_export_nid2str(tsi->tsi_exp));
}
mti->mti_flags |= LDD_F_UPDATE;
- /* Erased logs means start from scratch. */
- mti->mti_flags &= ~LDD_F_UPGRADE14;
}
rc = mgs_find_or_make_fsdb(tsi->tsi_env, mgs, mti->mti_fsname, &c_fsdb);
GOTO(out_norevoke, rc);
}
- /*
- * Log writing contention is handled by the fsdb_mutex.
- *
- * It should be alright if someone was reading while we were
- * updating the logs - if we revoke at the end they will just update
- * from where they left off.
- */
-
- if (mti->mti_flags & LDD_F_UPGRADE14) {
- CERROR("Can't upgrade from 1.4 (%d)\n", rc);
- GOTO(out, rc);
- }
-
+ /*
+ * Log writing contention is handled by the fsdb_mutex.
+ *
+ * It should be alright if someone was reading while we were
+ * updating the logs - if we revoke at the end they will just update
+ * from where they left off.
+ */
if (mti->mti_flags & LDD_F_UPDATE) {
CDEBUG(D_MGS, "updating %s, index=%d\n", mti->mti_svname,
mti->mti_stripe_index);
GOTO(out, rc);
}
- mti->mti_flags &= ~(LDD_F_VIRGIN | LDD_F_UPDATE |
- LDD_F_NEED_INDEX | LDD_F_WRITECONF |
- LDD_F_UPGRADE14);
- mti->mti_flags |= LDD_F_REWRITE_LDD;
+ mti->mti_flags &= ~(LDD_F_VIRGIN | LDD_F_UPDATE |
+ LDD_F_NEED_INDEX | LDD_F_WRITECONF);
+ mti->mti_flags |= LDD_F_REWRITE_LDD;
}
out:
mutex_lock(&fsdb->fsdb_mutex);
- if (mti->mti_flags &
- (LDD_F_VIRGIN | LDD_F_UPGRADE14 | LDD_F_WRITECONF)) {
- /* Generate a log from scratch */
- if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
+ if (mti->mti_flags & (LDD_F_VIRGIN | LDD_F_WRITECONF)) {
+ /* Generate a log from scratch */
+ if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
rc = mgs_write_log_mdt(env, mgs, fsdb, mti);
- } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
+ } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
rc = mgs_write_log_ost(env, mgs, fsdb, mti);
- } else {
- CERROR("Unknown target type %#x, can't create log for "
- "%s\n", mti->mti_flags, mti->mti_svname);
- }
- if (rc) {
- CERROR("Can't write logs for %s (%d)\n",
- mti->mti_svname, rc);
- GOTO(out_up, rc);
- }
- } else {
- /* Just update the params from tunefs in mgs_write_log_params */
- CDEBUG(D_MGS, "Update params for %s\n", mti->mti_svname);
- mti->mti_flags |= LDD_F_PARAM;
- }
+ } else {
+ CERROR("Unknown target type %#x, can't create log for %s\n",
+ mti->mti_flags, mti->mti_svname);
+ }
+ if (rc) {
+ CERROR("Can't write logs for %s (%d)\n",
+ mti->mti_svname, rc);
+ GOTO(out_up, rc);
+ }
+ } else {
+ /* Just update the params from tunefs in mgs_write_log_params */
+ CDEBUG(D_MGS, "Update params for %s\n", mti->mti_svname);
+ mti->mti_flags |= LDD_F_PARAM;
+ }
/* allocate temporary buffer, where class_get_next_param will
make copy of a current parameter */
}
}
/* A config command without a start marker before it is
- illegal (post 146) */
- if (!(cfg->cfg_flags & CFG_F_COMPAT146) &&
- !(cfg->cfg_flags & CFG_F_MARKER) &&
+ * illegal
+ */
+ if (!(cfg->cfg_flags & CFG_F_MARKER) &&
(lcfg->lcfg_command != LCFG_MARKER)) {
CWARN("Config not inside markers, ignoring! "
"(inst: %p, uuid: %s, flags: %#x)\n",
printf("Lustre FS: %s\n", ldd->ldd_fsname);
printf("Mount type: %s\n", MT_STR(ldd));
printf("Flags: %#x\n", ldd->ldd_flags);
- printf(" (%s%s%s%s%s%s%s%s%s)\n",
- IS_MDT(ldd) ? "MDT ":"",
- IS_OST(ldd) ? "OST ":"",
- IS_MGS(ldd) ? "MGS ":"",
- ldd->ldd_flags & LDD_F_NEED_INDEX ? "needs_index ":"",
- ldd->ldd_flags & LDD_F_VIRGIN ? "first_time ":"",
- ldd->ldd_flags & LDD_F_UPDATE ? "update ":"",
- ldd->ldd_flags & LDD_F_WRITECONF ? "writeconf ":"",
- ldd->ldd_flags & LDD_F_NO_PRIMNODE? "no_primnode ":"",
- ldd->ldd_flags & LDD_F_UPGRADE14 ? "upgrade1.4 ":"");
- printf("Persistent mount opts: %s\n", ldd->ldd_mount_opts);
+ printf(" (%s%s%s%s%s%s%s%s)\n",
+ IS_MDT(ldd) ? "MDT " : "",
+ IS_OST(ldd) ? "OST " : "",
+ IS_MGS(ldd) ? "MGS " : "",
+ ldd->ldd_flags & LDD_F_NEED_INDEX ? "needs_index " : "",
+ ldd->ldd_flags & LDD_F_VIRGIN ? "first_time " : "",
+ ldd->ldd_flags & LDD_F_UPDATE ? "update " : "",
+ ldd->ldd_flags & LDD_F_WRITECONF ? "writeconf " : "",
+ ldd->ldd_flags & LDD_F_NO_PRIMNODE ? "no_primnode " : "");
+ printf("Persistent mount opts: %s\n", ldd->ldd_mount_opts);
osd_print_ldd_params(mop);
if (ldd->ldd_userdata[0])
printf("Comment: %s\n", ldd->ldd_userdata);
if (strlen(new_fsname) > 0) {
if (!(mop->mo_flags & (MO_FORCEFORMAT | MO_RENAME)) &&
(!(ldd->ldd_flags &
- (LDD_F_UPGRADE14 | LDD_F_VIRGIN | LDD_F_WRITECONF)))) {
+ (LDD_F_VIRGIN | LDD_F_WRITECONF)))) {
fprintf(stderr, "%s: cannot change the name "
"of a registered target\n", progname);
return 1;
}
if (index_option && !(mop->mo_ldd.ldd_flags &
- (LDD_F_UPGRADE14 | LDD_F_VIRGIN |
- LDD_F_WRITECONF))) {
+ (LDD_F_VIRGIN | LDD_F_WRITECONF))) {
fprintf(stderr, "%s: cannot change the index of"
" a registered target\n", progname);
return 1;
ldd->ldd_flags &= ~LDD_F_NEED_INDEX;
}
- if ((ldd->ldd_flags & (LDD_F_NEED_INDEX | LDD_F_UPGRADE14)) ==
- (LDD_F_NEED_INDEX | LDD_F_UPGRADE14)) {
- fatal();
- fprintf(stderr, "Can't find the target index, "
- "specify with --index\n");
- ret = EINVAL;
- goto out;
- }
-
if (ldd->ldd_flags & LDD_F_NEED_INDEX)
fprintf(stderr, "warning: %s: for Lustre 2.4 and later, the "
"target index must be specified with --index\n",
return EINVAL;
}
- if (ldd->ldd_flags & LDD_F_UPGRADE14) {
- fprintf(stderr, "%s: we cannot upgrade %s from this (very old) "
- "Lustre version\n", progname, source);
- return EINVAL;
- }
-
if (ldd->ldd_flags & LDD_F_UPDATE)
clear_update_ondisk(source, ldd);