Whamcloud - gitweb
LU-4971 ldlm: drop redundant ibits lock interoperability check
[fs/lustre-release.git] / lustre / ptlrpc / import.c
index f474dd7..720ce1e 100644 (file)
@@ -1048,10 +1048,17 @@ finish:
 
                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 ((imp->imp_connect_flags_orig & OBD_CONNECT_IBITS) &&
+                   !(ocd->ocd_connect_flags & OBD_CONNECT_IBITS)) {
+                       LCONSOLE_WARN("%s: MDS %s does not support ibits "
+                                     "lock, either very old or invalid: "
+                                     "requested "LPX64", replied "LPX64"\n",
+                                     imp->imp_obd->obd_name,
+                                     imp->imp_connection->c_remote_uuid.uuid,
+                                     imp->imp_connect_flags_orig,
+                                     ocd->ocd_connect_flags);
+                       GOTO(out, rc = -EPROTO);
+               }
 
                if (!warned && (ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
                    (ocd->ocd_version > LUSTRE_VERSION_CODE +