From: Alexander Boyko Date: Wed, 11 Mar 2020 10:40:52 +0000 (-0400) Subject: LU-13356 client: don't use OBD_CONNECT_MNE_SWAB X-Git-Tag: 2.12.9-RC1~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=337b1d1bb301725b91380326985af52a5bede3a1;hp=be237a523e1208888f8f7d10e2a88709ea823a74;p=fs%2Flustre-release.git LU-13356 client: don't use OBD_CONNECT_MNE_SWAB 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. Lustre-change: https://review.whamcloud.com/37880 Lustre-commit: 3fe77a129e131014ff654bde616a62a1e243e322 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 Cray-bug-id: LUS-8484 Change-Id: I4f8ddeb1808cfaee7507e0efcdefa24040cfcbb6 Reviewed-by: Andreas Dilger Reviewed-by: Artem Blagodarenko Reviewed-by: Oleg Drokin Signed-off-by: Etienne AUJAMES Reviewed-on: https://review.whamcloud.com/41309 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexander Boyko Reviewed-by: Stephane Thiell --- diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 91bb142..9c911a2 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -846,12 +846,6 @@ struct ptlrpc_body_v2 { * flag to check_obd_connect_data(), and updates wiretests accordingly, so it * can be approved and landed easily 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)) @@ -922,7 +916,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 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index d9d7335..a041d41 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1106,8 +1106,9 @@ int target_handle_connect(struct ptlrpc_request *req) mds_conn = OCD_HAS_FLAG(data, MDS); mds_mds_conn = OCD_HAS_FLAG(data, MDS_MDS); - /* 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.12.7 + * 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 diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index 2eb650c..2dc1a8a 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -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) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 3c7a51ff..8fcd0ec 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -460,10 +460,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;