Whamcloud - gitweb
LU-17258 socklnd: ensure connection type established upon race
authorChris Horn <chris.horn@hpe.com>
Thu, 2 Nov 2023 19:28:45 +0000 (12:28 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 14 Nov 2023 22:37:08 +0000 (22:37 +0000)
commit8371f6a75188488e6c9f4fc4d478d5fe9dfe0d1e
tree2a983d04cab0578838eaf3dca0a87e3af09e95a3
parentbca2c7ca22eedeca504e0205d952050ea88ba446
LU-17258 socklnd: ensure connection type established upon race

When a connection race is hit between two peers, only increment the
retry count if a connection of the specific type has already been
established; otherwise, this can lead to an unexpected value set in
ksnr_connected and some of the assertions being triggered in
ksocknal_connect():

"ASSERTION( (wanted & ((((1UL))) << (3))) != 0 ) failed"

Lustre-change: https://review.whamcloud.com/52957
Lustre-commit: 5afe3b0538c533c3cca370bc9c0901abccca299a

Fixes: da893c6c97 ("LU-16191 socklnd: limit retries on conns_per_peer mismatch")
HPE-bug-id: LUS-11922
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Signed-off-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Change-Id: I6e8abb39ad3c0bcd7fbc8f8c5478c903029df908
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53046
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c