Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 9af2524..9104459 100644 (file)
@@ -723,6 +723,10 @@ static int lustre_start_mgc(struct super_block *sb)
                 /* nonfatal */
                 CERROR("can't set %s %d\n", KEY_INIT_RECOV_BACKUP, rc);
         /* We connect to the MGS at setup, and don't disconnect until cleanup */
+
+        ocd.ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_FID;
+        ocd.ocd_version = LUSTRE_VERSION_CODE;
+
         rc = obd_connect(NULL, &mgc_conn, obd, &(obd->obd_uuid), &ocd);
         if (rc) {
                 CERROR("connect failed %d\n", rc);
@@ -774,8 +778,13 @@ static int lustre_stop_mgc(struct super_block *sb)
          * force shotdown set in umount_begin */
         obd->obd_no_recov = 1;
 
-        if (obd->u.cli.cl_mgc_mgsexp)
-                obd_disconnect(obd->u.cli.cl_mgc_mgsexp);
+        if (obd->u.cli.cl_mgc_mgsexp) {
+                /* An error is not fatal, if we are unable to send the
+                   disconnect mgs ping evictor cleans up the export */
+                rc = obd_disconnect(obd->u.cli.cl_mgc_mgsexp);
+                if (rc)
+                        CDEBUG(D_MOUNT, "disconnect failed %d\n", rc);
+        }
 
         /* Save the obdname for cleaning the nid uuids, which are
            obdname_XX */