Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Fri, 9 Mar 2007 03:02:57 +0000 (03:02 +0000)
committerbobijam <bobijam>
Fri, 9 Mar 2007 03:02:57 +0000 (03:02 +0000)
b=11090
r=green

Description: Checking the version difference of client vs. server, report error if the gap is too big.

lustre/ChangeLog
lustre/ldlm/ldlm_lib.c
lustre/ptlrpc/import.c

index 6b625d0..91bdd18 100644 (file)
@@ -235,7 +235,14 @@ Details    : Add EXT3_FEATURE_RO_COMPAT_DIR_NLINK flag to
             EXT3_FEATURE_RO_COMPAT_SUPP. This flag will be set whenever
             subdirectory count crosses 32000. This will aid e2fsck to
             correctly handle more than 32000 subdirectories.
-       
+            
+Severity   : normal
+Frequency  : always
+Bugzilla   : 11090
+Description: versioning check is incomplete
+Details    : Checking the version difference of client vs. server, report
+             error if the gap is too big.
+
 ------------------------------------------------------------------------------
 
 TBD         Cluster File Systems, Inc. <info@clusterfs.com>
index dd1960b..e9dcf16 100644 (file)
@@ -631,9 +631,13 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
                                   "libclient connection attempt\n");
                         GOTO(out, rc = -EPROTO);
                 } else if (data->ocd_version < LUSTRE_VERSION_CODE -
+                                               LUSTRE_VERSION_ALLOWED_OFFSET ||
+                           data->ocd_version > LUSTRE_VERSION_CODE +
                                                LUSTRE_VERSION_ALLOWED_OFFSET) {
-                        DEBUG_REQ(D_WARNING, req, "Refusing old (%d.%d.%d.%d) "
+                        DEBUG_REQ(D_WARNING, req, "Refusing %s (%d.%d.%d.%d) "
                                   "libclient connection attempt\n",
+                                  data->ocd_version < LUSTRE_VERSION_CODE ?
+                                  "old" : "new",
                                   OBD_OCD_VERSION_MAJOR(data->ocd_version),
                                   OBD_OCD_VERSION_MINOR(data->ocd_version),
                                   OBD_OCD_VERSION_PATCH(data->ocd_version),
index 970a66b..f61f86b 100644 (file)
@@ -686,7 +686,9 @@ finish:
 
                 if ((ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
                     (ocd->ocd_version > LUSTRE_VERSION_CODE +
-                    LUSTRE_VERSION_OFFSET_WARN)) {
+                                        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 */
 #ifdef __KERNEL__
@@ -695,13 +697,15 @@ finish:
                         const char *action = "recompiling this application";
 #endif
 
-                        CWARN("Server %s version (%d.%d.%d.%d) is much newer. "
+                        CWARN("Server %s version (%d.%d.%d.%d) is much %s. "
                               "Consider %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",
                               action, LUSTRE_VERSION_STRING);
                 }
 
@@ -739,13 +743,15 @@ finish:
                               never see this from VFS context */
                                 CERROR("Server %s version (%d.%d.%d.%d) "
                                        "refused connection from this client "
-                                       "as too old version (%s).  Client must "
+                                       "as too %s version (%s).  Client must "
                                        "be recompiled\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 ?
+                                      "old" : "new",
                                       LUSTRE_VERSION_STRING);
                                 ptlrpc_deactivate_import(imp);
                                 IMPORT_SET_STATE(imp, LUSTRE_IMP_CLOSED);