-/* COMPAT_146 */
-/* verify that we can handle the old config logs */
-int mgs_upgrade_sv_14(const struct lu_env *env, struct mgs_device *mgs,
- struct mgs_target_info *mti, struct fs_db *fsdb)
-{
- int rc = 0;
- ENTRY;
-
- /* Create ost log normally, as servers register. Servers
- register with their old uuids (from last_rcvd), so old
- (MDT and client) logs should work.
- - new MDT won't know about old OSTs, only the ones that have
- registered, so we need the old MDT log to get the LOV right
- in order for old clients to work.
- - Old clients connect to the MDT, not the MGS, for their logs, and
- will therefore receive the old client log from the MDT /LOGS dir.
- - Old clients can continue to use and connect to old or new OSTs
- - New clients will contact the MGS for their log
- */
-
- LCONSOLE_INFO("upgrading server %s from pre-1.6\n", mti->mti_svname);
- server_mti_print("upgrade", mti);
-
- if (cfs_test_bit(FSDB_LOG_EMPTY, &fsdb->fsdb_flags)) {
- LCONSOLE_ERROR_MSG(0x14a, "The old client log %s-client is "
- "missing. Was tunefs.lustre successful?\n",
- mti->mti_fsname);
- RETURN(-ENOENT);
- }
-
- if (fsdb->fsdb_gen == 0) {
- /* There were no markers in the client log, meaning we have
- not updated the logs for this fs */
- CDEBUG(D_MGS, "found old, unupdated client log\n");
- }
-
- if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
- if (mgs_log_is_empty(env, mgs, mti->mti_svname)) {
- LCONSOLE_ERROR_MSG(0x14b, "The old MDT log %s is "
- "missing. Was tunefs.lustre "
- "successful?\n",
- mti->mti_svname);
- RETURN(-ENOENT);
- }
- /* We're starting with an old uuid. Assume old name for lov
- as well since the lov entry already exists in the log. */
- CDEBUG(D_MGS, "old mds uuid %s\n", mti->mti_uuid);
- if (strncmp(mti->mti_uuid, fsdb->fsdb_mdtlov + 4,
- strlen(fsdb->fsdb_mdtlov) - 4) != 0) {
- CERROR("old mds uuid %s doesn't match log %s (%s)\n",
- mti->mti_uuid, fsdb->fsdb_mdtlov,
- fsdb->fsdb_mdtlov + 4);
- RETURN(-EINVAL);
- }
- }
-
- if (!cfs_test_bit(FSDB_OLDLOG14, &fsdb->fsdb_flags)) {
- LCONSOLE_ERROR_MSG(0x14c, "%s-client is supposedly an old "
- "log, but no old LOV or MDT was found. "
- "Consider updating the configuration with"
- " --writeconf.\n", mti->mti_fsname);
- }
-
- RETURN(rc);
-}
-/* end COMPAT_146 */
-