From patchwork Fri Oct 13 12:05:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115765 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp650131qgn; Fri, 13 Oct 2017 05:06:17 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBeKNKasahWL8FhvydPGpAFwadKSx0oxNjivw7ZhlxWLg5/tWcSrD0rWx0Ggc2wV+od9Njm X-Received: by 10.99.116.22 with SMTP id p22mr1140025pgc.372.1507896377741; Fri, 13 Oct 2017 05:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507896377; cv=none; d=google.com; s=arc-20160816; b=zEaPZeAdpWC5phjY7bJ1zwm7k1wFuGfte+qZfKViUkq2INx44d2+ArmdAYzKgPdvxY Llglzt0qenOT+etfUbD0KpKxvvgK89kBalUUpelwM9PDoeS1gcr1VjqHnSsQ2s+LzPoL wmf4yyxrkFHZsyQWiUgEIRs8gKlnUIv8ZeivZUrfOczr13QpDI2Z0pi++90kd/T90Pey FDQEvN15O07JsQvjsvyKvK5kIJlCG6dRTGE4VFfT1HDEqfRM75Ll3EB5GQJhPB5QYEV7 cf/Z9Hn7avv6q94Zfuh2S712pENJzSzQRDnyi/uqv3ZBrlyZqnm+vgcC5pp8SzkPCUTd ljFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TkGizDXyH/XeqmgzdNB+WNTE38rJcch1hk5RCOy3zaY=; b=CZf6G5Knenouq4MfWo2GLwDKWF7bduMfTptrP+1y4bbPuiocWNrA+tFCuuXBBEb79u sOSPnwWXEuWZskArA3uCWq+oWFtmF26fYKT6faMy0zc/72CD09vLdPDlElxVjHUSH3jw YPE8DDkCOFI3wPaSrEz3v1xMO5L2ZuevEzAjmoy0BqfnCnJnYjrylHaR2EXjJrw7MrL/ zAQFB7bqoQmPPvslvpW813oJkfKp4YJblgZls0j1zDaM56/fIVu9aM0TM8Wfz2NGJVFp BZ1mJjp7qIQT3tIkPuDjNyxK+G2bW/tt1gY0xK/JGSneT8COoeW1Swx8ZpNfjcVoH5YB u1bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g3si536443plp.724.2017.10.13.05.06.17; Fri, 13 Oct 2017 05:06:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758192AbdJMMGP (ORCPT + 27 others); Fri, 13 Oct 2017 08:06:15 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:58112 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753406AbdJMMGN (ORCPT ); Fri, 13 Oct 2017 08:06:13 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MZwSd-1dpZ0V2gyl-00LmZj; Fri, 13 Oct 2017 14:06:04 +0200 From: Arnd Bergmann To: "Darrick J. Wong" , linux-xfs@vger.kernel.org Cc: Arnd Bergmann , Brian Foster , Carlos Maiolino , Dave Chinner , linux-kernel@vger.kernel.org Subject: [PATCH] xfs: move two more RT specific functions into CONFIG_XFS_RT Date: Fri, 13 Oct 2017 14:05:40 +0200 Message-Id: <20171013120603.4135344-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:VqiOKPcPce/1W1JVpQwgNLmy7tCQ2UNmt3pRr4bSZBOO0uQuhiO ghYhShlnXt6bZaziSGBN7ZkK8KWQAjY0DgsCDfEnXcSF11DKI7act0cNG36HNf+Dr1BHrh9 aE6HGGSiRelupj2u5CwIGsuXHQHBzoXGz+Gwtp2VW9LL8rbU1p50rezqr5VR1l2o8hZv01S hiYy2EY22zRuOVGseI/YQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:MucjomNWb1U=:hYxmdNM9W3OQm2fYjiyy4W vsJvB7XF2Qhoqep7/YmqI94uw4pKYDaIYnHexIDNjDV7cMJb0JejKI8O3u5giQvHmIm/UnE/P NyAUV+YC/XnJn3su3KJZCKaaAXNfnXJhyMD2R8FkwQqDss5y1JBtXYnijzCiwQarzHCfcEHlN bHw+yMhDV+ufeQqC1olQLJowE8qxArgUXZghDEvEMzCcqqBhltiAI3uOtb09FzKI90GkKkfN/ mXBm68gnnxCUtAkYHekIPMciYB9LFeC01/nDMZjR8/yjfQvIz2gwTPul8iaOiNh6FsW7A/Py6 2NRBL/KLuioIujgGupmAH7/zmugxM3Lv8JfIF15JijQdxMREDl08ejCdsvckyGFA1drmSzaS5 BOm3CY6Ia4qleq6cf2bvHzMkPob4f8OhUBAviI6Vo+L69lvlGao/MLY0hRtUj6mHizGQvcxlD /C5Y1Z+nmT15pzti3w//wXpzTOw9rBdMEV0Iulx509jpWzmKPBj/l7i7aZYeCEY9wRc+qyn14 M/M54ZahIb2AV5fNo50lHxK6sJtb4Gjg7HpIcUJdP8BeoRnwNt9gFv6j2OFBqmpWzwdUGoqdB clGRtG25x6axpsEdX8GmE0Q539wUr+afnV8SRj5lD/86E3+9VMqna5p8QiIpsyVnR2x1ZO2xE x5SFuQefytlIpuIa52VbRxKLv0E5W5yxfhBKgz93TUuXB5s9d/lbsDB6CAcuzeeJeXRlBMZBg f2E0h+g6/3MimfUir4XJ6jArzVFLN+hyftigEw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The last cleanup introduced two harmless warnings: fs/xfs/xfs_fsmap.c:480:1: warning: '__xfs_getfsmap_rtdev' defined but not used fs/xfs/xfs_fsmap.c:372:1: warning: 'xfs_getfsmap_rtdev_rtbitmap_helper' defined but not used This moves those two functions as well. Fixes: bb9c2e543325 ("xfs: move more RT specific code under CONFIG_XFS_RT") Signed-off-by: Arnd Bergmann --- fs/xfs/xfs_fsmap.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) -- 2.9.0 Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Acked-by: Geert Uytterhoeven diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 560e0b40ac1b..43cfc07996a4 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -367,29 +367,6 @@ xfs_getfsmap_datadev_helper( return xfs_getfsmap_helper(cur->bc_tp, info, rec, rec_daddr); } -/* Transform a rtbitmap "record" into a fsmap */ -STATIC int -xfs_getfsmap_rtdev_rtbitmap_helper( - struct xfs_trans *tp, - struct xfs_rtalloc_rec *rec, - void *priv) -{ - struct xfs_mount *mp = tp->t_mountp; - struct xfs_getfsmap_info *info = priv; - struct xfs_rmap_irec irec; - xfs_daddr_t rec_daddr; - - rec_daddr = XFS_FSB_TO_BB(mp, rec->ar_startblock); - - irec.rm_startblock = rec->ar_startblock; - irec.rm_blockcount = rec->ar_blockcount; - irec.rm_owner = XFS_RMAP_OWN_NULL; /* "free" */ - irec.rm_offset = 0; - irec.rm_flags = 0; - - return xfs_getfsmap_helper(tp, info, &irec, rec_daddr); -} - /* Transform a bnobt irec into a fsmap */ STATIC int xfs_getfsmap_datadev_bnobt_helper( @@ -475,6 +452,30 @@ xfs_getfsmap_logdev( return xfs_getfsmap_helper(tp, info, &rmap, 0); } +#ifdef CONFIG_XFS_RT +/* Transform a rtbitmap "record" into a fsmap */ +STATIC int +xfs_getfsmap_rtdev_rtbitmap_helper( + struct xfs_trans *tp, + struct xfs_rtalloc_rec *rec, + void *priv) +{ + struct xfs_mount *mp = tp->t_mountp; + struct xfs_getfsmap_info *info = priv; + struct xfs_rmap_irec irec; + xfs_daddr_t rec_daddr; + + rec_daddr = XFS_FSB_TO_BB(mp, rec->ar_startblock); + + irec.rm_startblock = rec->ar_startblock; + irec.rm_blockcount = rec->ar_blockcount; + irec.rm_owner = XFS_RMAP_OWN_NULL; /* "free" */ + irec.rm_offset = 0; + irec.rm_flags = 0; + + return xfs_getfsmap_helper(tp, info, &irec, rec_daddr); +} + /* Execute a getfsmap query against the realtime device. */ STATIC int __xfs_getfsmap_rtdev( @@ -521,7 +522,6 @@ __xfs_getfsmap_rtdev( return query_fn(tp, info); } -#ifdef CONFIG_XFS_RT /* Actually query the realtime bitmap. */ STATIC int xfs_getfsmap_rtdev_rtbitmap_query(