Whamcloud - gitweb
LU-4913 mgc: mgc import reconnect race
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index f8ddf0b..5cd96bf 100644 (file)
@@ -226,7 +226,6 @@ int lustre_start_mgc(struct super_block *sb)
         lnet_nid_t nid;
         char *mgcname = NULL, *niduuid = NULL, *mgssec = NULL;
         char *ptr;
-        int recov_bk;
         int rc = 0, i = 0, j, len;
         ENTRY;
 
@@ -277,6 +276,8 @@ int lustre_start_mgc(struct super_block *sb)
 
         obd = class_name2obd(mgcname);
         if (obd && !obd->obd_stopping) {
+               int recov_bk;
+
                 rc = obd_set_info_async(NULL, obd->obd_self_export,
                                         strlen(KEY_MGSSEC), KEY_MGSSEC,
                                         strlen(mgssec), mgssec, NULL);
@@ -449,16 +450,6 @@ int lustre_start_mgc(struct super_block *sb)
            so we know when we can get rid of the mgc. */
        atomic_set(&obd->u.cli.cl_mgc_refcount, 1);
 
-        /* Try all connections, but only once. */
-        recov_bk = 1;
-        rc = obd_set_info_async(NULL, obd->obd_self_export,
-                                sizeof(KEY_INIT_RECOV_BACKUP),
-                                KEY_INIT_RECOV_BACKUP,
-                                sizeof(recov_bk), &recov_bk, NULL);
-        if (rc)
-                /* nonfatal */
-                CWARN("can't set %s %d\n", KEY_INIT_RECOV_BACKUP, rc);
-
        /* We connect to the MGS at setup, and don't disconnect until cleanup */
        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT |
                                  OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV |