From patchwork Thu Feb 27 21:09:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11409865 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A815914BC for ; Thu, 27 Feb 2020 21:24:22 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90D24246A0 for ; Thu, 27 Feb 2020 21:24:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90D24246A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id B1B5F348C00; Thu, 27 Feb 2020 13:22:08 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 7F20721FA6E for ; Thu, 27 Feb 2020 13:18:49 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 826E41030; Thu, 27 Feb 2020 16:18:14 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 80CA746C; Thu, 27 Feb 2020 16:18:14 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:09:36 -0500 Message-Id: <1582838290-17243-109-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 108/622] lustre: obd: check '-o network' and peer discovery conflict X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Sebastien Buisson "-o network=net" client mount option is not taken into account when LNet dynamic peer discovery is active. Check if LNet dynamic peer discovery is active on local node. If it is, return error if "-o network=net" option is specified. This patch will have to be reverted when the incompatibility between "-o network=net" client mount option and LNet dynamic peer discovery is resolved. WC-bug-id: https://jira.whamcloud.com/browse/LU-11057 Lustre-commit: 2269d27e07cb ("LU-11057 obd: check '-o network' and peer discovery conflict") Signed-off-by: Sebastien Buisson Reviewed-on: https://review.whamcloud.com/32562 Reviewed-by: Andreas Dilger Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/obdclass/obd_mount.c | 7 +++++++ include/linux/lnet/api.h | 1 + net/lnet/lnet/api-ni.c | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/fs/lustre/obdclass/obd_mount.c b/fs/lustre/obdclass/obd_mount.c index 5cf404c..d143112 100644 --- a/fs/lustre/obdclass/obd_mount.c +++ b/fs/lustre/obdclass/obd_mount.c @@ -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++; } diff --git a/include/linux/lnet/api.h b/include/linux/lnet/api.h index a57ecc8..4b152c8 100644 --- a/include/linux/lnet/api.h +++ b/include/linux/lnet/api.h @@ -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 */ diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c index 07bc29f..c81f46f 100644 --- a/net/lnet/lnet/api-ni.c +++ b/net/lnet/lnet/api-ni.c @@ -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);