Whamcloud - gitweb
LU-13356 client: don't use OBD_CONNECT_MNE_SWAB 80/37880/11
authorAlexander Boyko <c17825@cray.com>
Wed, 11 Mar 2020 10:40:52 +0000 (06:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Apr 2020 08:09:41 +0000 (08:09 +0000)
OBD_CONNECT_MNE_SWAB is equal to OBD_CONNECT_MDS_MDS, and
it was used at MGC client in past for mne swabbing during interop.
Right now it is interpreted at MGS like OBD_CONNECT_MDS_MDS and skip
these clients from eviction and lock canceling after timeout.

Fixes: 1bdc4fd0594e ("LU-6307 obdclass: distinguish MGC/MDT connection properly")
Test-Parameters: testlist=runtests clientversion=2.12 envdefinitions=MDS_MOUNT_OPTS="-orw",OST_MOUNT_OPTS="-orw"
Test-Parameters: testlist=runtests serverversion=2.12 envdefinitions=MDS_MOUNT_OPTS="-orw",OST_MOUNT_OPTS="-orw"
Test-Parameters: testlist=runtests clientversion=2.10 clientdistro=el7.6 envdefinitions=MDS_MOUNT_OPTS="-orw",OST_MOUNT_OPTS="-orw"
Test-Parameters: testlist=runtests serverversion=2.10 serverdistro=el7.6 envdefinitions=MDS_MOUNT_OPTS="-orw",OST_MOUNT_OPTS="-orw"
Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-8484
Change-Id: I4f8ddeb1808cfaee7507e0efcdefa24040cfcbb6
Reviewed-on: https://review.whamcloud.com/37880
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/ldlm/ldlm_lib.c
lustre/mgs/mgs_llog.c
lustre/obdclass/obd_mount.c

index 1402fbb..1dc835f 100644 (file)
@@ -849,12 +849,6 @@ struct ptlrpc_body_v2 {
  * to reserve the flag for future use.
  */
 
-/* The MNE_SWAB flag is overloading the MDS_MDS bit only for the MGS
- * connection.  It is a temporary bug fix for Imperative Recovery interop
- * between 2.2 and 2.3 x86/ppc nodes, and can be removed when interop for
- * 2.2 clients/servers is no longer needed.  LU-1252/LU-1644. */
-#define OBD_CONNECT_MNE_SWAB            OBD_CONNECT_MDS_MDS
-
 #define OCD_HAS_FLAG(ocd, flg)  \
         (!!((ocd)->ocd_connect_flags & OBD_CONNECT_##flg))
 
@@ -929,7 +923,7 @@ struct ptlrpc_body_v2 {
 
 #define MGS_CONNECT_SUPPORTED  (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
                                OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV | \
-                               OBD_CONNECT_MNE_SWAB | OBD_CONNECT_PINGLESS |\
+                               OBD_CONNECT_PINGLESS |\
                                OBD_CONNECT_BULK_MBITS | OBD_CONNECT_BARRIER)
 
 #define MGS_CONNECT_SUPPORTED2 0
index 038da9e..4943301 100644 (file)
@@ -1138,8 +1138,8 @@ int target_handle_connect(struct ptlrpc_request *req)
                                OBD_CONNECT_MDS_MDS) != 0;
 
                /*
-                * OBD_CONNECT_MNE_SWAB is defined as OBD_CONNECT_MDS_MDS
-                * for Imperative Recovery connection from MGC to MGS.
+                * OBD_CONNECT_MNE_SWAB is removed at 2.14
+                * Checking OBD_CONNECT_FID can be removed in the future.
                 *
                 * Via check OBD_CONNECT_FID, we can distinguish whether
                 * the OBD_CONNECT_MDS_MDS/OBD_CONNECT_MNE_SWAB is from
index 3341cd3..1e37173 100644 (file)
@@ -1513,23 +1513,21 @@ static int only_mgs_is_running(struct obd_device *mgs_obd)
                /* skip self export */
                if (exp == mgs_obd->obd_self_export)
                        continue;
-               if (exp_connect_flags(exp) & OBD_CONNECT_MDS_MDS)
-                       continue;
 
                ++num_exports;
 
-               CERROR("%s: node %s still connected during replace_nids "
-                      "connect_flags:%llx\n",
-                      mgs_obd->obd_name,
-                      libcfs_nid2str(exp->exp_nid_stats->nid),
-                      exp_connect_flags(exp));
-
+               if (num_exports > 1)
+                       CERROR("%s: node %s still connected during replace_nids connect_flags:%llx\n",
+                              mgs_obd->obd_name,
+                              libcfs_nid2str(exp->exp_nid_stats->nid),
+                              exp_connect_flags(exp));
        }
        spin_unlock(&mgs_obd->obd_dev_lock);
 
-       /* osd, MGS and MGC + self_export
-          (wc -l /proc/fs/lustre/devices <= 2) && (non self exports == 0) */
-       return (num_devices <= 3) && (num_exports == 0);
+       /* osd, MGS and MGC + MGC export (nosvc starts MGC)
+        *  (wc -l /proc/fs/lustre/devices <= 3) && (non self exports == 1)
+        */
+       return (num_devices <= 3) && (num_exports <= 1);
 }
 
 static int name_create_mdt(char **logname, char *fsname, int mdt_idx)
index 62e1de8..de23440 100644 (file)
@@ -469,10 +469,6 @@ int lustre_start_mgc(struct super_block *sb)
                                  OBD_CONNECT_LVB_TYPE |
                                  OBD_CONNECT_BULK_MBITS | OBD_CONNECT_BARRIER;
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
-       data->ocd_connect_flags |= OBD_CONNECT_MNE_SWAB;
-#endif
-
        if (lmd_is_client(lsi->lsi_lmd) &&
            lsi->lsi_lmd->lmd_flags & LMD_FLG_NOIR)
                data->ocd_connect_flags &= ~OBD_CONNECT_IMP_RECOV;