+ /* NB: If the log for the MDT is empty, it means
+ * the MDT is only added to the index
+ * map, and not being process yet, i.e. this
+ * is an unregistered MDT, see mgs_write_log_target().
+ * so we should skip it. Otherwise
+ *
+ * 1. MGS get register request for MDT1 and MDT2.
+ *
+ * 2. Then both MDT1 and MDT2 are added into
+ * fsdb_mdt_index_map. (see mgs_set_index()).
+ *
+ * 3. Then MDT1 get the lock of fsdb_mutex, then
+ * generate the config log, here, it will regard MDT2
+ * as an existent MDT, and generate "add osp" for
+ * lustre-MDT0001-osp-MDT0002. Note: at the moment
+ * MDT0002 config log is still empty, so it will
+ * add "add osp" even before "lov setup", which
+ * will definitly cause trouble.
+ *
+ * 4. MDT1 registeration finished, fsdb_mutex is
+ * released, then MDT2 get in, then in above
+ * mgs_steal_llog_for_mdt_from_client(), it will
+ * add another osp log for lustre-MDT0001-osp-MDT0002,
+ * which will cause another trouble.*/
+ if (!mgs_log_is_empty(env, mgs, logname))
+ rc = mgs_write_log_osp_to_mdt(env, mgs, fsdb,
+ mti, i, logname);
+