Whamcloud - gitweb
LU-9115 llite: buggy special handling on MULTIMODRPCS 35/25435/2
authorNiu Yawei <yawei.niu@intel.com>
Tue, 14 Feb 2017 03:04:56 +0000 (22:04 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 18 Feb 2017 23:51:25 +0000 (23:51 +0000)
There is some special handling over MULTIMODPRCS flag in
client_connect_import(), it looks unnecessary and buggy,
the MULTIMODPRCS flag would be cleared unexpectedly from
imp_connect_data on reconnect.

This patch removed the special handling code and treat
MULTIMODRPCS normally just like other flags.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Icba5a1413349f7a4c61dcac0bb4a39f1d1b0128d
Reviewed-on: https://review.whamcloud.com/25435
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/ldlm/ldlm_lib.c
lustre/llite/llite_lib.c

index c102edc..7ea5b43 100644 (file)
@@ -555,7 +555,6 @@ int client_connect_import(const struct lu_env *env,
        struct obd_connect_data *ocd;
        struct lustre_handle    conn    = { 0 };
        int                     rc;
-       bool                    is_mdc = false;
        ENTRY;
 
        *exp = NULL;
@@ -580,18 +579,12 @@ int client_connect_import(const struct lu_env *env,
        ocd = &imp->imp_connect_data;
        if (data) {
                *ocd = *data;
-               is_mdc = strncmp(imp->imp_obd->obd_type->typ_name,
-                                LUSTRE_MDC_NAME, 3) == 0;
-               if (is_mdc)
-                       data->ocd_connect_flags |= OBD_CONNECT_MULTIMODRPCS;
                imp->imp_connect_flags_orig = data->ocd_connect_flags;
                imp->imp_connect_flags2_orig = data->ocd_connect_flags2;
        }
 
        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);
        }
@@ -602,10 +595,6 @@ int client_connect_import(const struct lu_env *env,
                         ocd->ocd_connect_flags, "old %#llx, new %#llx\n",
                         data->ocd_connect_flags, ocd->ocd_connect_flags);
                data->ocd_connect_flags = ocd->ocd_connect_flags;
-               /* clear the flag as it was not set and is not known
-                * by upper layers */
-               if (is_mdc)
-                       data->ocd_connect_flags &= ~OBD_CONNECT_MULTIMODRPCS;
        }
 
        ptlrpc_pinger_add_import(imp);
index 94b9a29..7ec723d 100644 (file)
@@ -215,7 +215,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_DIR_STRIPE |
                                  OBD_CONNECT_BULK_MBITS |
                                  OBD_CONNECT_SUBTREE |
-                                 OBD_CONNECT_FLAGS2;
+                                 OBD_CONNECT_FLAGS2 | OBD_CONNECT_MULTIMODRPCS;
 
        data->ocd_connect_flags2 = 0;