Whamcloud - gitweb
LU-7185 ldlm: Restore connect flags on failure 50/16950/5
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Mon, 26 Oct 2015 23:47:38 +0000 (19:47 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 2 Jun 2016 04:40:34 +0000 (04:40 +0000)
Restore connect flags on failure of ptlrpc_connect_import()
to prevent an LBUG due to flags mismatch.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: I9149c8d2f512c1f920b3bdfa8f3435b03dc72ab2
Reviewed-on: http://review.whamcloud.com/16950
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/ldlm/ldlm_lib.c

index 3aea6a2..928913c 100644 (file)
@@ -568,6 +568,8 @@ int client_connect_import(const struct lu_env *env,
 
         rc = ptlrpc_connect_import(imp);
         if (rc != 0) {
+               if (data && is_mdc)
+                       data->ocd_connect_flags &= ~OBD_CONNECT_MULTIMODRPCS;
                 LASSERT (imp->imp_state == LUSTRE_IMP_DISCON);
                 GOTO(out_ldlm, rc);
         }