In the
5f8847bca12afb798de600299356ed2e3655a53e, we introduced the
version checking for the MDT-MDT connection. But there is a corner
that the MGC will set OBD_CONNECT_MNE_SWAB (that is defined as the
same as OBD_CONNECT_MDS_MDS) in the connection flags for Imperative
Recovery interoperability issues with MGS. So the server needs to
know whether the connection is really from another MDT or from the
MGC via checking OBD_CONNECT_FID (that is not set for the MGC-MGS
connection).
Test-Parameters: envdefinitions=ONLY=105 clientjob=lustre-b2_6 clientbuildno=19 testlist=recovery-small
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9cee743d5474702b77adbb8c3dedd6c19faef15f
Reviewed-on: http://review.whamcloud.com/13927
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
OBD_CONNECT_LIGHTWEIGHT) != 0;
/* OBD_CONNECT_MNE_SWAB is defined as OBD_CONNECT_MDS_MDS
- * for Imperative Recovery connection from MGC to MGS. */
+ * for Imperative Recovery connection from MGC to MGS.
+ *
+ * Via check OBD_CONNECT_FID, we can distinguish whether
+ * the OBD_CONNECT_MDS_MDS/OBD_CONNECT_MNE_SWAB is from
+ * MGC or MDT. */
if (!lw_client &&
(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) &&
- !(data->ocd_connect_flags & OBD_CONNECT_IMP_RECOV) &&
+ (data->ocd_connect_flags & OBD_CONNECT_FID) &&
(data->ocd_connect_flags & OBD_CONNECT_VERSION)) {
__u32 major = OBD_OCD_VERSION_MAJOR(data->ocd_version);
__u32 minor = OBD_OCD_VERSION_MINOR(data->ocd_version);
if (!(imp->imp_connect_flags_orig & OBD_CONNECT_LIGHTWEIGHT) &&
(imp->imp_connect_flags_orig & OBD_CONNECT_MDS_MDS) &&
- !(imp->imp_connect_flags_orig & OBD_CONNECT_IMP_RECOV) &&
+ (imp->imp_connect_flags_orig & OBD_CONNECT_FID) &&
(ocd->ocd_connect_flags & OBD_CONNECT_VERSION)) {
__u32 major = OBD_OCD_VERSION_MAJOR(ocd->ocd_version);
__u32 minor = OBD_OCD_VERSION_MINOR(ocd->ocd_version);