diff mbox series

[12/15] lnet: peer state to lock primary nid

Message ID 1629685666-4533-13-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS as of Aug 22, 2021 | expand

Commit Message

James Simmons Aug. 23, 2021, 2:27 a.m. UTC
From: Amir Shehata <ashehata@whamcloud.com>

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

WC-bug-id: https://jira.whamcloud.com/browse/LU-14668
Lustre-commit: 684943e2d0c2ad09 ("LU-14668 lnet: peer state to lock primary nid")
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43562
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 include/linux/lnet/lib-types.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/lnet/lib-types.h b/include/linux/lnet/lib-types.h
index 6b97ab9..85b0d54 100644
--- a/include/linux/lnet/lib-types.h
+++ b/include/linux/lnet/lib-types.h
@@ -812,6 +812,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 */