Whamcloud - gitweb
LU-16709 lnet: fix locking multiple peer NIDs
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Tue, 20 Jun 2023 19:21:42 +0000 (12:21 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 16 Jul 2023 23:07:33 +0000 (23:07 +0000)
commit70f7b7e9bef06160296e23ad75270125266c3c3d
tree2f7346860d7bd1018a8e700ca6021e819b88e01a
parent4b96af4a8f003c6aed4f283d9405eca7035e6d7c
LU-16709 lnet: fix locking multiple peer NIDs

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.

This patch adds updates to the original port because master
version of of this moment evolved after it was landed.

Lustre-change: https://review.whamcloud.com/50530
Lustre-commit: 3b7a02ee4d656b7b3e044713681da2f56dddb152

Test-parameters: trivial testlist=sanity-lnet

Fixes: 1a2db3e14b78 ("EX-7251 lnet: fix locking multiple NIDs")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I3303e618b37a76c30be6426972e7853bb31ae497
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51384
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/include/uapi/linux/lnet/libcfs_ioctl.h
lnet/lnet/api-ni.c
lnet/lnet/peer.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetctl.c
lustre/tests/sanity-lnet.sh