Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp111590ybi; Wed, 29 May 2019 17:44:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBtmX4QgAibkRJwftiz7kXMmB66zScExHnmBJCIIDf+I7zewQbPfz1DGYgC4aTE4+HlGeI X-Received: by 2002:a63:144e:: with SMTP id 14mr933369pgu.304.1559177083416; Wed, 29 May 2019 17:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559177083; cv=none; d=google.com; s=arc-20160816; b=UbY2Tqit7ieRSXavuk3pv0XgQvhMtDIOHmYBE2e38TwoIjmftZ4yM7S89e6WYDxr7k AVX71pHbpW+JOxvevZqI0ORbwxm6OEjAlIPncGpZTgz6J5GWWgcFnvTvMW0DPoJmUUZH lipH0MpXWc8KjDkE8CrTWEgcjxwukQhoM3ZBbzvnfHdgB/+GThRDenNDaAzvOMNDS5Th mcQlz5yS9uAdk3OLUclTNdGlttG91Jx4b3lyfYxwlg7c1+9KuyfA4EBOuzKWEjrO3mz9 qLyAd0Lg3TryHjjT13ABx3hzwyOTpUKd89Fy678Jy/dIRYnu2UJOcE05N95x398hRZ3/ mPZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:cc:subject:date:to :from; bh=C4B+vF7vooT1vc1rggBFsxlFZGqy9LSKuOFMsRDqFkw=; b=kl+T1b6otmTh2QlYvqmRLIzl2p0AKZpUsv90PIqGIg8EMigahYMl92Wk7s7jxY+CFI NVDj4fpxZiRVV4IEAbKva3ba1H339rsvQ8LwN+FmN/1v4MXakViRVieSFNwVlonzOQDR FauImYFtCs5fTZ0o6MCTwRm2hPvlzk04ZPRXyoV4QEOmHwoe0pbwoHFJ2pY0DDX3xrv1 Q5hqlucJ9Xpy0FraHS6fIXXJvlPzN8JGTTQdC2rqx0SPMMBxle6eMSoJH5k4pIpxniVf O+Weq7AEV+O6mCCSuheJ47Duh8i9izLtrdytNdP8h4U/rQY9YcJMzYIRgH4pZfLLoeQb OiAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l59si1183265pjb.38.2019.05.29.17.44.28; Wed, 29 May 2019 17:44:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfE3Anz (ORCPT + 99 others); Wed, 29 May 2019 20:43:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:46562 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726527AbfE3Anz (ORCPT ); Wed, 29 May 2019 20:43:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2D744AC4F; Thu, 30 May 2019 00:43:54 +0000 (UTC) From: NeilBrown To: Olga Kornievskaia , Chuck Lever , Schumaker Anna , Trond Myklebust Date: Thu, 30 May 2019 10:41:28 +1000 Subject: [PATCH 8/9] pNFS: Allow multiple connections to the DS Cc: linux-nfs@vger.kernel.org Message-ID: <155917688885.3988.14415976491019492843.stgit@noble.brown> In-Reply-To: <155917564898.3988.6096672032831115016.stgit@noble.brown> References: <155917564898.3988.6096672032831115016.stgit@noble.brown> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust If the user specifies -onconnect= mount option, then set up connections to the pNFS data server as well. The connections will all go to the same IP address. Signed-off-by: Trond Myklebust Signed-off-by: NeilBrown --- fs/nfs/nfs3client.c | 1 + fs/nfs/nfs4client.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c index fb0c425b5d45..c6987077ad15 100644 --- a/fs/nfs/nfs3client.c +++ b/fs/nfs/nfs3client.c @@ -93,6 +93,7 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv, .net = mds_clp->cl_net, .timeparms = &ds_timeout, .cred = mds_srv->cred, + .nconnect = mds_clp->cl_nconnect, }; struct nfs_client *clp; char buf[INET6_ADDRSTRLEN + 1]; diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 401a76290e55..0b15ee54b13c 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -943,6 +943,9 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, return ERR_PTR(-EINVAL); cl_init.hostname = buf; + if (mds_clp->cl_nconnect > 1) + cl_init.nconnect = mds_clp->cl_nconnect; + if (mds_srv->flags & NFS_MOUNT_NORESVPORT) __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);