Whamcloud - gitweb
LU-14661 obdclass: Add peer NI when processing llog (again)
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Mon, 10 Apr 2023 16:51:47 +0000 (09:51 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 15 Apr 2023 00:06:32 +0000 (00:06 +0000)
commitfc7c510e27eae92907c791702f78bed32bd041ad
tree61b884514750a6ec378f1571d888c98bf4f8bbbb
parent871e9897eb3ea8c2728529b7ba6d12484b6746e7
LU-14661 obdclass: Add peer NI when processing llog (again)

Construct peers when processing the config log so that LNet has
complete information about peer info stored in the config log.

These are "temporary" peers which can be overwritten by discovery.

In client_import_add_nids_to_conn(), we do not need to hold the
import lock when adding NIDs to the obd_uuid, and LNet needs to
take the LNet API mutex when adding/modifying peers. We don't want
to take the mutex while a spin lock is already being held, so drop
the spin lock prior to calling class_add_nids_to_uuid().

Lustre-change: https://review.whamcloud.com/43510
Lustre-commit: 16321de596f6395153be6cbb6192250516963077

[This was problematic when the patch first landed, but was fixed
 by commit aacb16191a ("LU-14668 lnet: Lock primary NID logic")]

Fixes: 759d488fa0 ("EX-6349 revert: Add peer NI when processing llog")
HPE-bug-id: LUS-9293
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ib587ef478251e9722b21210e896838e0344d0e47
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50589
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ldlm/ldlm_lib.c
lustre/obdclass/lustre_peer.c