The Lustre 2.5.4 client will print a warning about connections with
2.1.3 servers, yet they are still supposed to be interoperable.
Increase the window of warning to be up to Lustre 2.5.50, since we
do not intend to allow interoperability between 2.1 and 2.6 systems.
This was from the time when major releases like Lustre 1.4 and 1.8
were many years apart would have no chance for interoperation.
Only print this message once per client, to avoid flooding the console
for connections to many servers or frequent network reconnections.
Server versions should all be nearly the same in any case.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I503523f80144c00c5ea1d312cc9204d9123ebbe5
Reviewed-on: http://review.whamcloud.com/7916
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
m4_define([LUSTRE_LIB_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 0, 1, 32)"])
dnl # linux lustre delta is 0.4.0.0 , next stable release version is ok
m4_define([LUSTRE_LIB_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 0, 1, 32)"])
dnl # linux lustre delta is 0.4.0.0 , next stable release version is ok
-m4_define([LUSTRE_CLI_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 4, 0, 0)"])
+m4_define([LUSTRE_CLI_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 4, 50, 0)"])
dnl # User editable part ends here. -----------------------------------------
dnl # User editable part ends here. -----------------------------------------
spin_lock(&imp->imp_lock);
cfs_list_del(&imp->imp_conn_current->oic_item);
spin_lock(&imp->imp_lock);
cfs_list_del(&imp->imp_conn_current->oic_item);
spin_unlock(&imp->imp_lock);
spin_unlock(&imp->imp_lock);
- if (!ocd->ocd_ibits_known &&
- ocd->ocd_connect_flags & OBD_CONNECT_IBITS)
- CERROR("Inodebits aware server returned zero compatible"
- " bits?\n");
-
- if ((ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
- (ocd->ocd_version > LUSTRE_VERSION_CODE +
- LUSTRE_VERSION_OFFSET_WARN ||
- ocd->ocd_version < LUSTRE_VERSION_CODE -
- LUSTRE_VERSION_OFFSET_WARN)) {
- /* Sigh, some compilers do not like #ifdef in the middle
- of macro arguments */
+ if (!ocd->ocd_ibits_known &&
+ ocd->ocd_connect_flags & OBD_CONNECT_IBITS)
+ CERROR("Inodebits aware server returned zero compatible"
+ " bits?\n");
+
+ if (!warned && (ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
+ (ocd->ocd_version > LUSTRE_VERSION_CODE +
+ LUSTRE_VERSION_OFFSET_WARN ||
+ ocd->ocd_version < LUSTRE_VERSION_CODE -
+ LUSTRE_VERSION_OFFSET_WARN)) {
+ /* Sigh, some compilers do not like #ifdef in the middle
+ of macro arguments */
+ const char *older = "older than client. "
+ "Consider upgrading server";
- const char *older = "older. Consider upgrading server "
- "or downgrading client";
+ const char *newer = "newer than client. "
+ "Consider recompiling application";
- const char *older = "older. Consider recompiling this "
- "application";
+ const char *newer = "newer than client. "
+ "Consider upgrading client";
- const char *newer = "newer than client version. "
- "Consider upgrading client";
- LCONSOLE_WARN("Server %s version (%d.%d.%d.%d) "
- "is much %s (%s)\n",
- obd2cli_tgt(imp->imp_obd),
- OBD_OCD_VERSION_MAJOR(ocd->ocd_version),
- OBD_OCD_VERSION_MINOR(ocd->ocd_version),
- OBD_OCD_VERSION_PATCH(ocd->ocd_version),
- OBD_OCD_VERSION_FIX(ocd->ocd_version),
- ocd->ocd_version > LUSTRE_VERSION_CODE ?
- newer : older, LUSTRE_VERSION_STRING);
- }
+ LCONSOLE_WARN("Server %s version (%d.%d.%d.%d) "
+ "is much %s (%s)\n",
+ obd2cli_tgt(imp->imp_obd),
+ OBD_OCD_VERSION_MAJOR(ocd->ocd_version),
+ OBD_OCD_VERSION_MINOR(ocd->ocd_version),
+ OBD_OCD_VERSION_PATCH(ocd->ocd_version),
+ OBD_OCD_VERSION_FIX(ocd->ocd_version),
+ ocd->ocd_version > LUSTRE_VERSION_CODE ?
+ newer : older, LUSTRE_VERSION_STRING);
+ warned = true;
+ }
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
/* Check if server has LU-1252 fix applied to not always swab
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
/* Check if server has LU-1252 fix applied to not always swab