Whamcloud - gitweb
LU-16709 lnet: fix locking multiple NIDs of the MR peer 30/50530/4
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Tue, 4 Apr 2023 21:02:51 +0000 (14:02 -0700)
committerSerguei Smirnov <ssmirnov@whamcloud.com>
Mon, 10 Apr 2023 22:16:40 +0000 (15:16 -0700)
commitddc9652a238e146e215157572b2e7e119de0e63b
tree9e5ba0d08ea01fb5224c1f6ecdc7bb28cdebb860
parent869dae0f37ce0f6999b1a6348c8e594b53ba56d9
LU-16709 lnet: fix locking multiple NIDs of the MR peer

If Lustre identifies the same peer with multiple NIDs,
as a result of peer discovery it is possible that
the discovered peer is found to contain a NID which is locked
as primary by a different existing peer record.
In this case it is safe to merge the peer records,
but the NID which got locked the earliest should be
kept as primary.

This allows for the first of the two locked NIDs
to stay primary as intended for the purpose of communicating
with Lustre even if peer discovery succeeded
using a different NID of MR peer.

Fixes: aacb16191a ("LU-14668 lnet: Lock primary NID logic")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Iec9f8b70053fe24cddee552358500dfad0234b7f
lnet/include/lnet/lib-types.h
lnet/lnet/peer.c