Whamcloud - gitweb
Branch: HEAD
[fs/lustre-release.git] / lustre / mds / mds_lov.c
index f5b0713..6d78907 100644 (file)
@@ -655,6 +655,8 @@ int mds_dt_synchronize(void *data)
         down(&mds->mds_orphan_recovery_sem);
 
         uuid = &watched->u.cli.cl_import->imp_target_uuid;
+        CWARN("MDS %s: %s now active, repairing the connection\n",
+              obd->obd_name, uuid->uuid);
 
         group = FILTER_GROUP_FIRST_MDS + mds->mds_num;
         rc = obd_set_info(watched->obd_self_export, strlen("mds_conn"),
@@ -825,15 +827,15 @@ int mds_dt_update_config(struct obd_device *obd, int clean)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lvfs_run_ctxt saved;
-        struct config_llog_instance cfg;
         struct llog_ctxt *ctxt;
+        struct config_llog_instance cfg;
         char *profile = mds->mds_profile, *name;
-        int rc, version, namelen;
+         int rc, version, namelen, value;
+        __u32 valsize;
         ENTRY;
 
         if (profile == NULL)
                 RETURN(0);
-
         cfg.cfg_instance = NULL;
         cfg.cfg_uuid = mds->mds_dt_uuid;
 
@@ -854,10 +856,22 @@ int mds_dt_update_config(struct obd_device *obd, int clean)
         ctxt = llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
         rc = class_config_process_llog(ctxt, name, &cfg);
         pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc == 0)
-                mds->mds_config_version = version;
         CWARN("Finished applying configuration log %s: %d\n", name, rc);
+        if (rc != 0) { 
+                GOTO(exit, rc);
+        }
+        /* retrieve size of EA */
+        rc = obd_get_info(mds->mds_md_exp, strlen("mdsize"),
+                          "mdsize", &valsize, &value);
+        
+        if (value > mds->mds_max_mdsize)
+                mds->mds_max_mdsize = value;
 
+        CDEBUG(D_INFO, "mds max md size %d \n", mds->mds_max_mdsize);
+        
+        if (rc == 0)
+                mds->mds_config_version = version;
+exit:
         OBD_FREE(name, namelen);
         RETURN(rc);
 }