Whamcloud - gitweb
LU-14668 lnet: peer state to lock primary nid 62/43562/5
authorAmir Shehata <ashehata@whamcloud.com>
Wed, 5 May 2021 01:20:54 +0000 (18:20 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 18 Aug 2021 01:59:05 +0000 (01:59 +0000)
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 <ashehata@whamcloud.com>
Change-Id: I8c55e90ad2abd083c2fc902a04d4cd06a3412bfa
Reviewed-on: https://review.whamcloud.com/43562
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-types.h

index ebe6065..fdf210c 100644 (file)
@@ -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 */