Whamcloud - gitweb
LU-14627 lnet: Ensure ref taken when queueing for discovery
authorChris Horn <chris.horn@hpe.com>
Thu, 22 Apr 2021 19:51:44 +0000 (14:51 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Jul 2021 05:33:22 +0000 (05:33 +0000)
commitcea5f1f36a30c8f01b6f27feb5a809732d6c3180
tree22b9295c972c6b2f590323e9328975629e32c275
parent163d44b44103fa733f10d663f6a6e57ea55ff504
LU-14627 lnet: Ensure ref taken when queueing for discovery

Call lnet_peer_queue_for_discovery() in
lnet_discovery_event_handler() to ensure that we take a ref on
the peer when forcing it onto the discovery queue. This also ensures
that the peer state has LNET_PEER_DISCOVERING.

Add a test to sanity-lnet.sh that can trigger the refcount loss bug
in discovery.

Lustre-change: https://review.whamcloud.com/43418
Lustre-commit: 2ce6957b69370b0ce75725d1d91866bf55c07fa8

HPE-bug-id: LUS-7651
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ie2908668c4ffde0f993b5b7ea9aa58acd1d6fa9c
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-on: https://review.whamcloud.com/44272
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/lnet/peer.c
lustre/tests/sanity-lnet.sh