From 81e010d101a667b2bc22c2caddeefd40f02a3d19 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Mon, 13 Feb 2017 22:04:56 -0500 Subject: [PATCH] LU-9115 llite: buggy special handling on MULTIMODRPCS 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 Change-Id: Icba5a1413349f7a4c61dcac0bb4a39f1d1b0128d Reviewed-on: https://review.whamcloud.com/25435 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/ldlm/ldlm_lib.c | 11 ----------- lustre/llite/llite_lib.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index c102edc..7ea5b43 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 94b9a29..7ec723d 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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; -- 1.8.3.1