From: Amir Shehata Date: Wed, 5 May 2021 01:20:54 +0000 (-0700) Subject: LU-14668 lnet: peer state to lock primary nid X-Git-Tag: 2.14.54~12 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=684943e2d0c2ad095e3521586d61d007b4f49abd LU-14668 lnet: peer state to lock primary nid Introduce the following two peer states: LNET_PEER_LOCK_PRIMARY, set by Lustre to lock the primary NID of a peer to the NID Lustre is configured with LNET_PEER_BAD_CONFIG, set by LNet if Lustre attempts to set a peer's Primary NID to a NID used as the primary NID of another peer Signed-off-by: Amir Shehata Change-Id: I8c55e90ad2abd083c2fc902a04d4cd06a3412bfa Reviewed-on: https://review.whamcloud.com/43562 Reviewed-by: Alexander Boyko Tested-by: jenkins Tested-by: Maloo Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin --- diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index ebe6065..fdf210c 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -803,6 +803,13 @@ struct lnet_peer { #define LNET_PEER_MARK_DELETION BIT(18) /* lnet_peer_del()/lnet_peer_del_locked() has been called on the peer */ #define LNET_PEER_MARK_DELETED BIT(19) +/* lock primary NID to what's requested by ULP */ +#define LNET_PEER_LOCK_PRIMARY BIT(20) +/* this is for informational purposes only. It is set if a peer gets + * configured from Lustre with a primary NID which belongs to another peer + * which is also configured by Lustre as the primary NID. + */ +#define LNET_PEER_BAD_CONFIG BIT(21) struct lnet_peer_net { /* chain on lp_peer_nets */