Whamcloud - gitweb
LU-17258 socklnd: ensure connection type established upon race 57/52957/3
authorChris Horn <chris.horn@hpe.com>
Thu, 2 Nov 2023 19:28:45 +0000 (12:28 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Nov 2023 22:07:54 +0000 (22:07 +0000)
commit5afe3b0538c533c3cca370bc9c0901abccca299a
tree2e59a89a7db6f56a997bbc454182e933b047a01e
parentc4c9a8eea31cf9aa02f75ca3f119f90d67c70cc5
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"

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-on: https://review.whamcloud.com/c/fs/lustre-release/+/52957
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c