From: Andreas Dilger Date: Tue, 17 Apr 2018 04:53:02 +0000 (-0600) Subject: LU-1644 mgc: remove obsolete IR swabbing workaround X-Git-Tag: 2.11.52~38 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a0c644fde3405bba6752885481f0fdfe05da1bcd;ds=sidebyside LU-1644 mgc: remove obsolete IR swabbing workaround The OBD_CONNECT_MNE_SWAB check was added to the MGC for compatibility with servers in the 2.2.0-2.2.55 range (in 2012) with big-endian clients. 2.2 was not an LTS release and is no longer being used. Remove the checks on the client for OBD_CONNECT_MNE_SWAB being set, and assume that the server does not have this bug. This will allow the removal of the rest of this workaround from the server code once there are no more clients depending on the presence of this flag. Signed-off-by: Andreas Dilger Change-Id: Ie128745e3af8e9d41454e095922e0f6bc8fcab07 Reviewed-on: https://review.whamcloud.com/32087 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/lustre_import.h b/lustre/include/lustre_import.h index c1c17bd..9191fa1 100644 --- a/lustre/include/lustre_import.h +++ b/lustre/include/lustre_import.h @@ -295,10 +295,6 @@ struct obd_import { imp_resend_replay:1, /* disable normal recovery, for test only. */ imp_no_pinger_recover:1, -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0) - /* need IR MNE swab */ - imp_need_mne_swab:1, -#endif /* import must be reconnected instead of * chouse new connection */ imp_force_reconnect:1, diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 2a664ce..b9d5dda 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1079,7 +1079,8 @@ int target_handle_connect(struct ptlrpc_request *req) * * Via check OBD_CONNECT_FID, we can distinguish whether * the OBD_CONNECT_MDS_MDS/OBD_CONNECT_MNE_SWAB is from - * MGC or MDT. */ + * MGC or MDT, since MGC does not use OBD_CONNECT_FID. + */ if (!lw_client && (data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) && (data->ocd_connect_flags & OBD_CONNECT_FID) && diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 6dd4cc1..963e904 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1760,13 +1760,7 @@ again: GOTO(out, rc); } - mne_swab = !!ptlrpc_rep_need_swab(req); -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0) - /* This import flag means the server did an extra swab of IR MNE - * records (fixed in LU-1252), reverse it here if needed. LU-1644 */ - if (unlikely(req->rq_import->imp_need_mne_swab)) - mne_swab = !mne_swab; -#endif + mne_swab = ptlrpc_rep_need_swab(req); /* When a nodemap config is received, we build a new nodemap config, * with new nodemap structs. We keep track of the most recently added diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 82ad4b7..0c434f2 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -730,7 +730,6 @@ static void obd_import_flags2str(struct obd_import *imp, struct seq_file *m) flag2str(imp, pingable); flag2str(imp, resend_replay); flag2str(imp, no_pinger_recover); - flag2str(imp, need_mne_swab); flag2str(imp, connect_tried); } diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index a1e1d25..2e7ac0e 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -831,25 +831,6 @@ static int ptlrpc_connect_set_flags(struct obd_import *imp, warned = true; } -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0) - /* Check if server has LU-1252 fix applied to not always swab - * the IR MNE entries. Do this only once per connection. This - * fixup is version-limited, because we don't want to carry the - * OBD_CONNECT_MNE_SWAB flag around forever, just so long as we - * need interop with unpatched 2.2 servers. For newer servers, - * the client will do MNE swabbing only as needed. LU-1644 */ - if (unlikely((ocd->ocd_connect_flags & OBD_CONNECT_VERSION) && - !(ocd->ocd_connect_flags & OBD_CONNECT_MNE_SWAB) && - OBD_OCD_VERSION_MAJOR(ocd->ocd_version) == 2 && - OBD_OCD_VERSION_MINOR(ocd->ocd_version) == 2 && - OBD_OCD_VERSION_PATCH(ocd->ocd_version) < 55 && - strcmp(imp->imp_obd->obd_type->typ_name, - LUSTRE_MGC_NAME) == 0)) - imp->imp_need_mne_swab = 1; - else /* clear if server was upgraded since last connect */ - imp->imp_need_mne_swab = 0; -#endif - if (ocd->ocd_connect_flags & OBD_CONNECT_CKSUM) { /* We sent to the server ocd_cksum_types with bits set * for algorithms we understand. The server masked off