@@ -1169,6 +1169,13 @@ int lmd_parse(char *options, struct lustre_mount_data *lmd)
rc = lmd_parse_network(lmd, s1 + 8);
if (rc)
goto invalid;
+
+ /* check if LNet dynamic peer discovery is activated */
+ if (LNetGetPeerDiscoveryStatus()) {
+ CERROR("LNet Dynamic Peer Discovery is enabled on this node. 'network' mount option cannot be taken into account.\n");
+ goto invalid;
+ }
+
clear++;
}
@@ -207,6 +207,7 @@ int LNetGet(lnet_nid_t self,
int LNetClearLazyPortal(int portal);
int LNetCtl(unsigned int cmd, void *arg);
void LNetDebugPeer(struct lnet_process_id id);
+int LNetGetPeerDiscoveryStatus(void);
/** @} lnet_misc */
@@ -4038,3 +4038,16 @@ static int lnet_ping(struct lnet_process_id id, signed long timeout,
kfree(buf);
return rc;
}
+
+/**
+ * Retrieve peer discovery status.
+ *
+ * Return 1 if lnet_peer_discovery_disabled is 0
+ * 0 if lnet_peer_discovery_disabled is 1
+ */
+int
+LNetGetPeerDiscoveryStatus(void)
+{
+ return !lnet_peer_discovery_disabled;
+}
+EXPORT_SYMBOL(LNetGetPeerDiscoveryStatus);