From 759d488fa04804b701f8f4af3618d812a5fd07c6 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 14 Dec 2022 22:00:01 +0300 Subject: [PATCH] EX-6349 Revert "LU-14661 obdclass: Add peer/peer NI when processing llog" This reverts commit e8ddb2f550072cdd3489389c107af3e892a21f66. It is causing problem with reconnection at failover. Signed-off-by: Alex Zhuravlev Change-Id: I53594f8f93474666c4abd96291d58dadf8ac5969 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49411 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/ldlm/ldlm_lib.c | 3 +-- lustre/obdclass/lustre_peer.c | 19 +------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index c5d06f1..8c6ccd7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -177,10 +177,9 @@ int client_import_add_nids_to_conn(struct obd_import *imp, lnet_nid_t *nids, list_for_each_entry(conn, &imp->imp_conn_list, oic_item) { if (class_check_uuid(&conn->oic_uuid, nids[0])) { *uuid = conn->oic_uuid; - spin_unlock(&imp->imp_lock); rc = class_add_nids_to_uuid(&conn->oic_uuid, nids, nid_count); - RETURN(rc); + break; } } spin_unlock(&imp->imp_lock); diff --git a/lustre/obdclass/lustre_peer.c b/lustre/obdclass/lustre_peer.c index da6411a..d344222 100644 --- a/lustre/obdclass/lustre_peer.c +++ b/lustre/obdclass/lustre_peer.c @@ -80,7 +80,6 @@ int class_add_uuid(const char *uuid, __u64 nid) { struct uuid_nid_data *data, *entry; int found = 0; - int rc; LASSERT(nid != 0); /* valid newconfig NID is never zero */ @@ -119,17 +118,10 @@ int class_add_uuid(const char *uuid, __u64 nid) if (found) { CDEBUG(D_INFO, "found uuid %s %s cnt=%d\n", uuid, libcfs_nid2str(nid), entry->un_nid_count); - rc = LNetAddPeer(entry->un_nids, entry->un_nid_count); - CDEBUG(D_INFO, "Add peer %s rc = %d\n", - libcfs_nid2str(data->un_nids[0]), rc); OBD_FREE(data, sizeof(*data)); } else { CDEBUG(D_INFO, "add uuid %s %s\n", uuid, libcfs_nid2str(nid)); - rc = LNetAddPeer(data->un_nids, data->un_nid_count); - CDEBUG(D_INFO, "Add peer %s rc = %d\n", - libcfs_nid2str(data->un_nids[0]), rc); } - return 0; } EXPORT_SYMBOL(class_add_uuid); @@ -179,8 +171,7 @@ int class_add_nids_to_uuid(struct obd_uuid *uuid, lnet_nid_t *nids, int nid_count) { struct uuid_nid_data *entry; - int i, rc; - bool matched = false; + int i; ENTRY; @@ -197,8 +188,6 @@ int class_add_nids_to_uuid(struct obd_uuid *uuid, lnet_nid_t *nids, if (!obd_uuid_equals(&entry->un_uuid, uuid)) continue; - - matched = true; CDEBUG(D_NET, "Updating UUID '%s'\n", obd_uuid2str(uuid)); for (i = 0; i < nid_count; i++) entry->un_nids[i] = nids[i]; @@ -206,12 +195,6 @@ int class_add_nids_to_uuid(struct obd_uuid *uuid, lnet_nid_t *nids, break; } spin_unlock(&g_uuid_lock); - if (matched) { - rc = LNetAddPeer(entry->un_nids, entry->un_nid_count); - CDEBUG(D_INFO, "Add peer %s rc = %d\n", - libcfs_nid2str(entry->un_nids[0]), rc); - } - RETURN(0); } EXPORT_SYMBOL(class_add_nids_to_uuid); -- 1.8.3.1