- if (!(mti->mti_flags & (LDD_F_WRITECONF | LDD_F_UPGRADE14 |
- LDD_F_UPDATE))) {
- /* We're just here as a startup ping. */
- CDEBUG(D_MGS, "Server %s is running on %s\n",
+ GOTO(out_norevoke, rc);
+ }
+
+ CDEBUG(D_MGS, "fs: %s index: %d is registered to MGS.\n",
+ mti->mti_fsname, mti->mti_stripe_index);
+
+ if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
+ if (b_fsdb->fsdb_barrier_status == BS_FREEZING_P1 ||
+ b_fsdb->fsdb_barrier_status == BS_FREEZING_P2 ||
+ b_fsdb->fsdb_barrier_status == BS_FROZEN) {
+ LCONSOLE_WARN("%s: the system is in barrier, refuse "
+ "the connection from MDT %s temporary\n",
+ obd->obd_name, mti->mti_svname);
+
+ GOTO(out_norevoke, rc = -EBUSY);
+ }
+
+ if (!(exp_connect_flags(tsi->tsi_exp) & OBD_CONNECT_BARRIER) &&
+ !b_fsdb->fsdb_barrier_disabled) {
+ LCONSOLE_WARN("%s: the MDT %s does not support write "
+ "barrier, so disable barrier on the "
+ "whole system.\n",
+ obd->obd_name, mti->mti_svname);
+
+ b_fsdb->fsdb_barrier_disabled = 1;
+ }
+ }
+
+ 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))) {
+ /* We're just here as a startup ping. */
+ CDEBUG(D_MGS, "Server %s is running on %s\n",