From patchwork Mon Aug 29 12:20:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101912 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1603316qga; Mon, 29 Aug 2016 05:21:09 -0700 (PDT) X-Received: by 10.67.1.35 with SMTP id bd3mr32143847pad.16.1472473269299; Mon, 29 Aug 2016 05:21:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si24685513pag.93.2016.08.29.05.21.07; Mon, 29 Aug 2016 05:21:09 -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 S933142AbcH2MVE (ORCPT + 27 others); Mon, 29 Aug 2016 08:21:04 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:51363 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932211AbcH2MVD (ORCPT ); Mon, 29 Aug 2016 08:21:03 -0400 Received: from wuerfel.lan. ([176.5.99.91]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MGbDM-1brWqQ1rl2-00DJwu; Mon, 29 Aug 2016 14:20:26 +0200 From: Arnd Bergmann To: Oleg Drokin , Andreas Dilger , James Simmons Cc: Mel Gorman , Arnd Bergmann , Greg Kroah-Hartman , Jinshan Xiong , Lai Siyao , Bobi Jam , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: lustre: fix unstable pages tracking Date: Mon, 29 Aug 2016 14:20:00 +0200 Message-Id: <20160829122023.3018966-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:V23rBA29VhLf5iCZNZNIclcNH756RHS02fsDJ58X7bcFoWI3nfV 9gGMvUG83mRqm3d2WQlpUmSpFMh7H/9TwN9quBJSt+tWF9LCQL9MrGXWITlQKC5eWDjKYRq jflSIvEdXgQhyHB/erd+zR/9cN6+/AzJ2Wgf+yMPUbsyc1kslHWD9POKh7vukFBz4rYrWJZ YDvjaZrUm8gVavqIt8nNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:uV4Wk6xxtCc=:bNv6feLEm3G/jT1vvBdBlh IsXwhGWeEuC0MWahSS0mZqUlkwFyLoEqbLFcMyn7KjguO8CHnpwlgXMayip92gJeesOUXX8ma JgZTOcO2bbdasI9wz9SrPpjVpmcHyCZdt2OkB78w6hL9eFPODXlz3jVsqZE8ilVJDGB2wiLBj gWNeyDrudrHOsYhr8viIvd+b7dXvInrdR/t+R7Lu2U5o2Ii8nPxoz1RYVQ1RFL0cE6rKBRFZQ W7Q5rt3teT+w8X64a+dX7uDtaGdVsM9l/ho9kTDUDkO0e/OWt7zLpqBZOUIoHn6Ov/hiZ3eLK /m81AZ4+1vIUCZhJkG3MnPDiSaGRB8tfT1kYNCFsL76WijlabgEnmeVlS30qN1S2yf3HTXs/v i+K5gO+QU57DGFbjM3CzgbbqAb0vMQgdIIkGoUJERSvpxg3EcrJybtjuUYdeFo3MKthsl4EOL VagBCkkZROCSoQ+vkoorFqoqky3MDyKvLoM0bW277QTVwGQzj1Dz3noMca0wju9EuRrqNSv+x ER2FN6KBqqfkJ3OmMkdA8/sZjPTsST2fYJO3Qywut/y7/Nw20QGCRNtb9oBM1b5ciYj3MQ+FA GYOH/nnS5TM1RFJKR87SKd7weFYCNTP5i40RQGt4hZcO2/BB82UwB5uPkF9iw/WXAwYRFOlYQ epxCx3C4SByuElMwtb9cfuRTpsrTDZQTBaS2o1CmWtQ8maQG4eTp31tjKrkwW9GeqRdg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A patch to change to page accounting code (in v4.8-rc1) conflicts with a change to lustre (in staging-next for v4.9), and fortunately gets detected using a gcc warning: In file included from /git/arm-soc/include/linux/mm.h:1001:0, from /git/arm-soc/include/linux/highmem.h:7, from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/linux/libcfs.h:46, from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/libcfs.h:36, from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_cl_internal.h:45, from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_page.c:40: drivers/staging/lustre/lustre/osc/osc_page.c: In function 'unstable_page_accounting': include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds] atomic_long_add(x, &vm_zone_stat[item]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds] atomic_long_add(x, &vm_zone_stat[item]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes the function to use the correct interface for accounting in the "node" rather than the "zone". Signed-off-by: Arnd Bergmann Fixes: d806f30e639b ("staging: lustre: osc: revise unstable pages accounting") Fixes: 11fb998986a7 ("mm: move most file-based accounting to the node") --- drivers/staging/lustre/lustre/osc/osc_page.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.9.0 diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 583a0af2d388..c8889eabc402 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -789,7 +789,7 @@ out: /** * Atomic operations are expensive. We accumulate the accounting for the - * same page zone to get better performance. + * same page pgdat to get better performance. * In practice this can work pretty good because the pages in the same RPC * are likely from the same page zone. */ @@ -797,28 +797,28 @@ static inline void unstable_page_accounting(struct ptlrpc_bulk_desc *desc, int factor) { int page_count = desc->bd_iov_count; - void *zone = NULL; + pg_data_t *last = NULL; int count = 0; int i; for (i = 0; i < page_count; i++) { - void *pz = page_zone(desc->bd_iov[i].bv_page); + pg_data_t *pgdat = page_pgdat(desc->bd_iov[i].bv_page); - if (likely(pz == zone)) { + if (likely(pgdat == last)) { ++count; continue; } if (count > 0) { - mod_zone_page_state(zone, NR_UNSTABLE_NFS, + mod_node_page_state(pgdat, NR_UNSTABLE_NFS, factor * count); count = 0; } - zone = pz; + last = pgdat; ++count; } if (count > 0) - mod_zone_page_state(zone, NR_UNSTABLE_NFS, factor * count); + mod_node_page_state(last, NR_UNSTABLE_NFS, factor * count); } static inline void add_unstable_page_accounting(struct ptlrpc_bulk_desc *desc) From patchwork Mon Aug 29 12:20:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101911 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1603597qga; Mon, 29 Aug 2016 05:21:54 -0700 (PDT) X-Received: by 10.98.155.17 with SMTP id r17mr32285914pfd.24.1472473314599; Mon, 29 Aug 2016 05:21:54 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a78si38967890pfj.35.2016.08.29.05.21.54; Mon, 29 Aug 2016 05:21:54 -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 S933188AbcH2MVm (ORCPT + 27 others); Mon, 29 Aug 2016 08:21:42 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:52411 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932870AbcH2MVj (ORCPT ); Mon, 29 Aug 2016 08:21:39 -0400 Received: from wuerfel.lan. ([176.5.99.91]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MQqVB-1bWxBM1hW9-00U1UT; Mon, 29 Aug 2016 14:21:05 +0200 From: Arnd Bergmann To: Oleg Drokin , Andreas Dilger , James Simmons Cc: Mel Gorman , Arnd Bergmann , Greg Kroah-Hartman , "John L. Hammond" , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: lustre: hide unused variable Date: Mon, 29 Aug 2016 14:20:01 +0200 Message-Id: <20160829122023.3018966-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160829122023.3018966-1-arnd@arndb.de> References: <20160829122023.3018966-1-arnd@arndb.de> X-Provags-ID: V03:K0:14BI6w+wqV1o9CrKxx+mSJaf13HUGYfhIVc3t5AG5+50fQ5pvrU pCf235BMYiiwV2x2Lnm1kzkCDViDgqV77K7v4xw4KfOCO2uGHs5ApgDPJAD1XOsw1XDT/sH h9cHi1qo2CFeOoAeF3otZ5gXguvdmV3KAp16cgvxmXvj4Jj1ZIDnrXUkjwgmUhh0v8ldWpI PUJ6RfSWh1r6vrJ7UVV6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:vv1EfJ2gXSw=:sKr5+rb010hWX5hKDGEMLZ Cn6SNNUeyjiFnxSqEZmaGpOzW7C/BonzZ2lJKsMD6QmvnctCammfvcmMnn4yt4r35UigbnFrt b+mh4XbEqN5r+SD/4cIF98VkAWxTjISdWnr8q1Xo7bPfezKT0cKkm6I9rxoLx9/n4IhivIod8 QVK1Fotkx3qGqXrPxfbmYrdb1BTJUMD2I95dhbOz4zdFLh5hCeGXj5AKiSsfIgIqwO48vRLYr qmzegZm3Z2MYzOcCF0+MC1Wh3O9+8uH/kiMlJt967UPGuHFiWufxOvNuLDp4OvMjCDcXTM1Cj Ci/Y89zsxWO9I9uFmgUs858QnGPo8EYDWMVRWTXCwb8PbQpVVzCi5Mj9X67j8Yu2Nd0AUyc+C o30zkq0Ilv2flhUFUi6vilUhN5tgZeTijRiud11YpwbB54XTCpyU8NOKiiA9wO1dMq9iw9vU3 x90pENR8/h0xFG/EuwPfsOtB9feRfDsK95PrtvSLeJPYV6akboaHdexPJE/5fFYRL2xRfTONi ptZdEx4bfXYjBX6gqGhGamNwKnAW6wkgBauUdIb20qDxXvTW9R+ERSGfYRhMv/7EtAR7xtiXS nySmZGOn7v2bNaTS0C/nK9ePn5SuNsn5gwf/cMk+SPU0mD169El5ko8+83c81y6qbqEpE1e6u GuAu8Y0MzF3v6NO3YuYT+y5wXfCukzvcBLHF/13vrxO751j+tFwrdV7N+UobKytLWfvs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After a code cleanup, we get a harmless warning about a variable that is unused when CONFIG_FS_POSIX_ACL is disabled: drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_xattr_get_common': drivers/staging/lustre/lustre/llite/xattr.c:312:24: error: unused variable 'lli' [-Werror=unused-variable] This puts the variable declaration into the same #ifdef. Signed-off-by: Arnd Bergmann Fixes: 1e1f9ff406fd ("staging: lustre: llite: break ll_getxattr_common into 2 functions") --- drivers/staging/lustre/lustre/llite/xattr.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index f252c26ec30f..7b8d4699a71a 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -309,7 +309,9 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, { char fullname[strlen(handler->prefix) + strlen(name) + 1]; struct ll_sb_info *sbi = ll_i2sbi(inode); +#ifdef CONFIG_FS_POSIX_ACL struct ll_inode_info *lli = ll_i2info(inode); +#endif int rc; CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",