From patchwork Fri Nov 4 13:08:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9412599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 200CF6022E for ; Fri, 4 Nov 2016 13:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17BE92B05B for ; Fri, 4 Nov 2016 13:09:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C68E2B074; Fri, 4 Nov 2016 13:09:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07C432B05B for ; Fri, 4 Nov 2016 13:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754906AbcKDNJM (ORCPT ); Fri, 4 Nov 2016 09:09:12 -0400 Received: from mx141.netapp.com ([216.240.21.12]:46358 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754278AbcKDNJL (ORCPT ); Fri, 4 Nov 2016 09:09:11 -0400 X-IronPort-AV: E=Sophos;i="5.31,443,1473145200"; d="scan'208";a="159868340" Received: from vmwexchts02-prd.hq.netapp.com ([10.122.105.23]) by mx141-out.netapp.com with ESMTP; 04 Nov 2016 06:08:46 -0700 Received: from VMWEXCCAS09-PRD.hq.netapp.com (10.122.105.27) by VMWEXCHTS02-PRD.hq.netapp.com (10.122.105.23) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 4 Nov 2016 06:08:54 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS09-PRD.hq.netapp.com (10.122.105.27) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 4 Nov 2016 06:08:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZgApcpifBJXUMiK6AKRYfbCBIu7lbufY40Il5CSQHFg=; b=m3Oh/v/rfK0UQadClxjUPrqcFh+ra2iEq3QPcCFbjMqfXP9AHaYpyHwnPxkM2mvchmKKIlBU4M5Zo9jrJz82WJI4HcsJfjdqWHR5KplnJU6INWHNiLR0JlSxx+/xN34QGLOZLjOvpiZ6iIfC+UIHDo4gSx2l9dYgDJfC3Cf0cLM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.net (64.134.26.173) by BY2PR0601MB1639.namprd06.prod.outlook.com (10.163.107.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Fri, 4 Nov 2016 13:08:52 +0000 From: To: CC: , Subject: [PATCH] NFS: Don't print a pNFS error if we aren't using pNFS Date: Fri, 4 Nov 2016 09:08:41 -0400 Message-ID: <20161104130841.17150-1-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 X-Originating-IP: [64.134.26.173] X-ClientProxiedBy: BN6PR17CA0024.namprd17.prod.outlook.com (10.173.147.34) To BY2PR0601MB1639.namprd06.prod.outlook.com (10.163.107.17) X-MS-Office365-Filtering-Correlation-Id: 70939940-73d9-4892-4ab6-08d404b3ba19 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 2:z0PYWQ8w876GQkns5Zlq5rG6ctzjT1oZBnJ5TavxzomAbNW6My97fsoXOipyE8+1inCijt7L0kjOVGMXCUZF/LbJkAT5Kqd/+9tnkzf7YL2lPQkR9E09E038FpFNNFh65moyl7TOH8sntd8khtwyMTGM4xL/xPw0Jwe1d1gVgCWK94eOcsXwCt96VruvaxQFHgU8LCSZNJxcZGRd+KT7ow==; 3:8i13h/7npmqwMKwtvdzn9LIqHWMljEXeYq+1ObTGQeZfoNdGwKeZP+KZEbJn5gi7JTO/Lyd2H19FNSeRmwJ6uDU3iw7zsA7wLJRzKNODTqLWsLFpUTW1sfuf/TkFpqiG7oc3JcbiswU8FhITH4/35A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0601MB1639; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 25:TDcBNmYEAplOkO2vGVUSWI2rCczK8oTM2VR74s1nkcAALc2nxyMhBkeUHYT3sV/66KBGnFRiN8+jo7PGsGj4uqIUrQ661zhrjKXYxO04pYyAn9KIFThPTeTy+v/0HGJCQ/IrERxjd4T7JLnTbTk8z4SDzGBm083TevKxdUN2XAzwmcazR5/a0g9DzmwDzK8zUs5J3q3yjGJQJTtia66eDVkt8NtxUYQTz/Wf3BYrwtcBuI7LzxXKNeHDzI8AiiqynsipvaSfzFW7ps5DP4+jWTR+SO+MXnStqVlmEbm7mi8zyae+791wGjCbw+tLCAPZ77e8UF2mR6O08LA6iSfA17eudkcsFkVNO/qJu+/Gz7la9lLAMPFOFUMmXBMdUilZiCppwygQtUIUgz6oG9DTanvnMPoNNfNMuq43KRjynLKDTLJYPabJCdFWQvuUOWMt++ThApITvxwqWXDJjIAjDV9QgwagzQfmyBXorrneLNe7vyanP0LfulbMsizvgrwsuwYmET3hbbTYU47Yyos1td/S8vob4ETn5BB6Mpvy6FJdPyXdfgsPDq2oFlZOosWceSBDSFsqA3bJt/U0dlrtJTCwlBRpq+oS89I+ZkZF0jv4LZSAIoXFuITy47fbFrztvpc7XWryrWyMkfmEMIgVXzTg2VRFpnMEnSUbLdO+V//gIf6S3O7jPE7asOv14dVs+DI/dgVzw9po/u6p5gjuzmOalM7uThJUDm5vexqh/fJI0wAPepQ8R/iKf5JnX7OE X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 31:IWxYbAMfzJv5WZqojDuiyxnuPKRpcz2lJZYc5WUB/sRLeCaJuEbKKknMksNO43w+WVex7oDoTLGo+hN4skePWn2InWkWIsew6OZoA/FHazvWlxrHWEQuyM2F/AiMQuyI3PMsy7xUMeywNrL+UiU/0w48wmh5ngU0+jPJ8JobkDwHTHMC1a9viQcVV+Aws8Gv/yPps74PixHn1QUUz3CqBHil6cclszAm+QrMgu87z/QvPwnMJ4cDqlXN7t5ZJYVg; 20:PsEijZCXxQSGgsx5d4X+s1KQHaIQatBNkljRW985dPLeguT5fUnMrnXVdl9RmM9OKEuK73I9vgqNdR4fCVHOEYxF9Ww62i23RURTGZ8j/Zdx7JNRjIiMiDW+fmb2sqpzUcF/O0WmOAfSUIj+Tmqr7hvtwfdsD+1VodB8NTnlbeK5V4ZRpxza9jll+5570XyZPW3v3yUTW25r2S97YY/LQARARKELGSFvbjUe+2IGUg2UUC8Bow09T+qrToOg+mYsAprhJiQszZ8ctWgq+X/pTilBPlMPePsKLztyky2/mzZ2/wL9MU1PzZTndHIb4IFZQyg4CoS8BOIXZnEj+YBGTn3MfmdOf4vftwLaQxphvy5d5UnfGs2St59yuSagFtxJTFJ4tRWOm3wUC7LNxs39f0Ls/GBkj7mbbQR9XqRxPnrbe6+JO/YZ56YwcBDWWja0kzLAjcJMuYiTDWwwcmrwP5TWVhD1xMhVEfKemTj2FwQ1Lmww36AH/sdQk93Se/GU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6043046)(6042046); SRVR:BY2PR0601MB1639; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0601MB1639; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 4:LpEr1fMzwBUUya/9EbQzNUb1ygMtlW6vjIV9r1MmcY5Oa31yKW/xFswj05zxzP9nxtQT/q3cakE1GV5Sv5rBWj8U8A1XQ4PscQIH2RCuEUgjUZVMyhaaPtN6XDr3RVFsl1YPJpwarAzXkxhi4jxTPp5T4ztcO7lMKNVuVYV9XMNLAhl6iw7ELpNhcZZUCKNfRrLKQY/cPzPmy9FXtQW/d3klKU55stFtLG94ybKuFzQH3zvZW6vynTr8RFz0Rxafe0sw3qY4iBT4o5Z8Ae8qYuxeFlXWMe5AZR2oCtZ9mmqQtCmjaOcbJ1S8Gunbk/7ZrTjp2FC5IGl9xO2hTB8e+kba0zSFsYDCRBi+3qVmxs+QevyjJrCD/OreeJeKKrQ74I1CX1TgOFfBcEJ0FLOyOaJrJgfI/M9ka8xQyDkZf4+70FRbOy+O5+VFE6bO3+rW X-Forefront-PRVS: 01165471DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(48376002)(47776003)(50226002)(189998001)(6916009)(110136003)(5660300001)(36756003)(97736004)(6666003)(66066001)(69596002)(86152002)(77096005)(19580395003)(19580405001)(68736007)(50466002)(8676002)(101416001)(81166006)(81156014)(4326007)(2876002)(586003)(33026002)(42186005)(3846002)(86362001)(305945005)(50986999)(21086003)(2351001)(92566002)(106356001)(229853001)(1076002)(5003940100001)(2906002)(7846002)(105586002)(7736002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0601MB1639; H:gouda.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0601MB1639; 23:AO1LKIr7nx6inUeNS8lij0OfxHjQXI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Az9GVsHkUVqAT0/r4wjJY2vWpJys5Q0Hl/o3HUZHv5z64AqIHyc3xXr?= =?us-ascii?Q?T0VdJnERZWZOPkN8MrjHcIv5b9Fxmfm+Lyi+IPu9tPvJIp/yvJhJCVrywqWH?= =?us-ascii?Q?r9tLTmzIQdfkdtZI07MotiEfZXq9ZqsqJUc9Y5Ftd7y1blN+hPrOkBayYMxA?= =?us-ascii?Q?MjzDKzHKVEl/BnCpf8l705znb7AeYnMVaOEfMuATWrVQ/KK04S3MtPc3tce/?= =?us-ascii?Q?4OATsRqaMtBcygSikye7LGVyJd++4kwuK?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 6:qHiluIeT0+1B4lfd16+jSDUtGQfSyfAxam7HfS7QnCTs6IlhI02Q6JZtpbqzU3/18/B/IgoZ08mdAJn6wwd+AKIIkDZOIrUBrXDWMG52I2161CCGBHdCCVnSfEs3oloHCDMI41lLYfYLZTQgsnH7hMjmQPJPBvR50K0XRm6kb8RTrluzxPPBa4dmbgJlEYRYtrvT0yB9qXSMx63fLarp85hsgEvXFBDfD7QI4wHMfsXpsCE6lEFwIWOLPXYloR76yxDWqSB91LmlqU2xyNiF7eu+o0d7HcUZxZlshCLBOYcxTcLmdl3stwsOYuyQ6AVfkHSn5+LKgQ6XEjq/1HMQZw==; 5:x2S/bN/H/AvENehkhGVeiW75mtY7rXuvXHWBBSui1icc3Vu+TXS5yJIPekQ/1mK0ky24LGp1pkfTPU4UyYv7EtOqFWJ/5m47D+U2Trj1mXIdLaVSHYkL7jFnbH3fOlZ8uyWU4bJq9CILgv8ZeHMkFOXcAo3N1y90r33GRlQS8hU=; 24:fG5bUUuoy7Sp3TpkwowwxUl7QF3wWYdv+mFmsWJ57TaABMe0/EffneXo12DIn9A0EpXr/HGtGdK/qQzrjcCfWHMEZtZjSlxOcbMWNE3AvxM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0601MB1639; 7:Yr/YcGhebthbShMonNPVihfEOINVsCWHl/vKCbelXmhcFuPs6MuGG2HxRpETXGo8a5LhC7JYEM6XRVlkqpAO6r7yN+I3dcg9zHrZF0JsjTNoJQBo3KksBESP1wH0lGYCRQdiJm9uK3zIJlfzBnGBZ0aLK6VqtO0qHTSlege4luYkVH17Ukoo++jSJRO+4y+atHjY9VKIeyrpdPDo34Cu8AtiBJ5szAzTXBS1wg7ZzKLeBis3fGBz4a0Xe549nds/yA9qnqYoYfbRBMR5hFiwDAEV0+o5pyjsJN6OQrnulwH7AYgiEyFUoGyobwWcOVH10N6tKoZiWv8sW8GPe4cqFtUkIQvYwPKuyGJfE++4ZHE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2016 13:08:52.6293 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0601MB1639 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anna Schumaker We used to check for a valid layout type id before verifying pNFS flags as an indicator for if we are using pNFS. This changed in 3132e49ece with the introduction of multiple layout types, since now we are passing an array of ids instead of just one. Since then, users have been seeing a KERN_ERR printk show up whenever mounting NFS v4 without pNFS. This patch restores the original behavior of exiting set_pnfs_layoutdriver() early if we aren't using pNFS. Fixes 3132e49ece ("pnfs: track multiple layout types in fsinfo structure") Signed-off-by: Anna Schumaker Reviewed-by: Jeff Layton --- fs/nfs/pnfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 56b2d96..259ef85 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -146,6 +146,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, u32 id; int i; + if (fsinfo->nlayouttypes == 0) + goto out_no_driver; if (!(server->nfs_client->cl_exchange_flags & (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) { printk(KERN_ERR "NFS: %s: cl_exchange_flags 0x%x\n",