From patchwork Thu Jun 25 10:19:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Tao X-Patchwork-Id: 6674631 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1700C05AC for ; Thu, 25 Jun 2015 10:21:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 105CA2053F for ; Thu, 25 Jun 2015 10:21:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD7602053D for ; Thu, 25 Jun 2015 10:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932370AbbFYKU5 (ORCPT ); Thu, 25 Jun 2015 06:20:57 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36294 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754349AbbFYKUJ (ORCPT ); Thu, 25 Jun 2015 06:20:09 -0400 Received: by pdcu2 with SMTP id u2so50730296pdc.3 for ; Thu, 25 Jun 2015 03:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=m3/fJNlA1XUTuX7ekcgHMNiAmwkR0Nv+YRB4glEl5so=; b=Bp+m9deo4+/YIvn5zmjZt8ge2inylHPOKhfTsOQMKUypg6hocrQU/Ug9uqcL7z42gT mMulaCV+Nr9HgeJ2xjTVWb02sBt/5Yyh+uZEa9GaDocbz3BsVSadmcmDzLDjIu5u/agA SG3lRFqb5Jel1/+XxFfiY1Xrq6v6XvURlgPBxJRuK7PcbggzjR60XTuIHpVP6s/+LFl/ vOiviR3YXXdVMw/uPPw+i/avHPl9lGQXGVLxQtTmSx+JZsTvLdUjMTa7bNo6WJRBanPo ANtLWOCDda0SoHJubfoT8MwT6NqSjikYhCDQaK3jIb9N97MR4px+jt1OcnaAaY7Seln2 53pg== X-Gm-Message-State: ALoCoQmLJgFqzsTjHfzteZEfvZuXL/3Y4D1g+Dq3qalAXNMPoCoNu3b8DGMqnS8n7xIaL+3Ms0d+ X-Received: by 10.70.20.5 with SMTP id j5mr89871301pde.40.1435227608445; Thu, 25 Jun 2015 03:20:08 -0700 (PDT) Received: from lear.localdomain (ec2-54-65-164-9.ap-northeast-1.compute.amazonaws.com. [54.65.164.9]) by mx.google.com with ESMTPSA id wm8sm26373755pbc.19.2015.06.25.03.20.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 03:20:07 -0700 (PDT) From: Peng Tao To: linux-nfs@vger.kernel.org Cc: Trond Myklebust , Peng Tao Subject: [PATCH] nfs: provide pnfs_report_layoutstat when NFS42 is disabled Date: Thu, 25 Jun 2015 18:19:32 +0800 Message-Id: <1435227572-75919-1-git-send-email-tao.peng@primarydata.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kbuild test robot reported: fs/built-in.o: In function `pnfs_report_layoutstat': >> (.text+0x151a1c): undefined reference to `nfs42_proc_layoutstats_generic' Reported-by: kbuild test robot Signed-off-by: Peng Tao --- fs/nfs/pnfs.c | 2 ++ fs/nfs/pnfs.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index e5bd626..546cbbe 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2249,6 +2249,7 @@ struct nfs4_threshold *pnfs_mdsthreshold_alloc(void) return thp; } +#if IS_ENABLED(CONFIG_NFS_V4_2) int pnfs_report_layoutstat(struct inode *inode) { @@ -2303,3 +2304,4 @@ out_put: goto out; } EXPORT_SYMBOL_GPL(pnfs_report_layoutstat); +#endif diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 0a47239..3e6ab7b 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -292,8 +292,6 @@ int pnfs_write_done_resend_to_mds(struct nfs_pgio_header *); struct nfs4_threshold *pnfs_mdsthreshold_alloc(void); void pnfs_error_mark_layout_for_return(struct inode *inode, struct pnfs_layout_segment *lseg); -int pnfs_report_layoutstat(struct inode *inode); - /* nfs4_deviceid_flags */ enum { NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */ @@ -692,4 +690,14 @@ static inline void nfs4_pnfs_v3_ds_connect_unload(void) #endif /* CONFIG_NFS_V4_1 */ +#if IS_ENABLED(CONFIG_NFS_V4_2) +int pnfs_report_layoutstat(struct inode *inode); +#else +static inline int +pnfs_report_layoutstat(struct inode *inode) +{ + return 0; +} +#endif + #endif /* FS_NFS_PNFS_H */