From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68E70C433EF for ; Sat, 16 Jul 2022 11:57:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 587B58E0012; Sat, 16 Jul 2022 07:57:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 510088E0001; Sat, 16 Jul 2022 07:57:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B1158E0012; Sat, 16 Jul 2022 07:57:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 26DD28E0001 for ; Sat, 16 Jul 2022 07:57:26 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8489120CCF for ; Sat, 16 Jul 2022 11:57:25 +0000 (UTC) X-FDA: 79692812850.08.D7133FF Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf02.hostedemail.com (Postfix) with ESMTP id 4C0E680003 for ; Sat, 16 Jul 2022 11:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657972644; x=1689508644; h=date:from:to:cc:subject:message-id:mime-version; bh=N+JJkzR/n39hmVFjoazdqAE+jGyT5UrglfBK+rWgpHE=; b=AixNuQ2cpKN716W1ZYFbCAJb5B2h9HcCWLKGstOepWnUeIhhN7JlVExY DRnUcCXIWTnnEcHPkFTsKh2S9MwdI3CJa5PqkQ7x+1tHBlv9G7Bi374rO zJpfmiRN+7qWfFc0/0p+thiK1SwNGxeZUskD3hN1MXmX0xj9Ga+VP7P/f WE70g213X69ZITI4d0XGvMC7WYqt2n697TlDvPyJH+urX/KJb+8zPR2uA 6kh0wWhQGOiUZ1k1NhUSlrzRXKAwJ6mvbBFH/1XWyjJ7Nm+dQpjVb8c79 Bml0fMJAvCjW1E4Sezf6ko+Z8RQlfQf+Pf2nkaO8ilUcD8kEAVpcCxIlw g==; X-IronPort-AV: E=McAfee;i="6400,9594,10409"; a="284729654" X-IronPort-AV: E=Sophos;i="5.92,276,1650956400"; d="scan'208";a="284729654" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2022 04:57:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,276,1650956400"; d="scan'208";a="546961873" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 16 Jul 2022 04:57:08 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oCgPz-0001QK-Ks; Sat, 16 Jul 2022 11:57:07 +0000 Date: Sat, 16 Jul 2022 19:56:34 +0800 From: kernel test robot To: Dai Ngo Cc: kbuild-all@lists.01.org, Linux Memory Management List , Chuck Lever Subject: [linux-next:master 10517/10906] fs/nfsd/nfsctl.c:1504:24: error: 'NFS4_CLIENTS_PER_GB' undeclared Message-ID: <202207161955.NzM8CnQR-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657972645; a=rsa-sha256; cv=none; b=0sLzovYKzzsTK3w09jzC3sWjlJ9AKvGKUglLDenHbSIiQv1oLiEB8VWPMTadOq9HRfyAuf otZTr/USovBJyQiX2Ca/acjQGgkoOoDPLat4saj9rggZhUqwJu/rvy/EExJF/GtrL/z1Q+ 5CahOxo2thwFh4XHfh9LutBVLBmyG50= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=AixNuQ2c; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf02.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657972645; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=RTKphkkZ8p1TFC/djbbqr2MkAtrb7fU80WkMBbQpbmY=; b=YC+JbRbC8ZhA9ugRAuH4PmtX++jgNv3WQfPcGJwQRbRKx/S1bv6DbqbRQk1RFv3MGGf16Z qNoK+FdgkTngJMPA7gs1hTpW6ydjM/ZqpSUk/OuUNPO1jSS87v+JMLT5d6D4wdVvlHDUtF jktY7aJrwjQ3KwiR6vhtkvGTC4ovzGk= X-Rspamd-Queue-Id: 4C0E680003 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=AixNuQ2c; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf02.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam08 X-Stat-Signature: oun75z1761u3umh8anezqkks5xdtnyyd X-HE-Tag: 1657972644-596952 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6014cfa5bf32cf8c5c58b3cfd5ee0e1542c8a825 commit: 05eaba9bd8c0658004f71e781568f55263da8a64 [10517/10906] NFSD: limit the number of v4 clients to 1024 per 1GB of system memory config: arm-h3600_defconfig (https://download.01.org/0day-ci/archive/20220716/202207161955.NzM8CnQR-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=05eaba9bd8c0658004f71e781568f55263da8a64 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 05eaba9bd8c0658004f71e781568f55263da8a64 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/nfsd/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): fs/nfsd/nfsctl.c: In function 'nfsd_init_net': >> fs/nfsd/nfsctl.c:1504:24: error: 'NFS4_CLIENTS_PER_GB' undeclared (first use in this function) 1504 | max_clients *= NFS4_CLIENTS_PER_GB; | ^~~~~~~~~~~~~~~~~~~ fs/nfsd/nfsctl.c:1504:24: note: each undeclared identifier is reported only once for each function it appears in In file included from include/linux/kernel.h:26, from include/linux/cpumask.h:10, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:62, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from fs/nfsd/nfsctl.c:8: include/linux/minmax.h:36:9: error: first argument to '__builtin_choose_expr' not a constant 36 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp' 112 | #define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >) | ^~~~~~~~~~~~~ fs/nfsd/nfsctl.c:1505:32: note: in expansion of macro 'max_t' 1505 | nn->nfs4_max_clients = max_t(int, max_clients, NFS4_CLIENTS_PER_GB); | ^~~~~ vim +/NFS4_CLIENTS_PER_GB +1504 fs/nfsd/nfsctl.c 1470 1471 static __net_init int nfsd_init_net(struct net *net) 1472 { 1473 int retval; 1474 struct nfsd_net *nn = net_generic(net, nfsd_net_id); 1475 struct sysinfo si; 1476 u64 max_clients; 1477 1478 retval = nfsd_export_init(net); 1479 if (retval) 1480 goto out_export_error; 1481 retval = nfsd_idmap_init(net); 1482 if (retval) 1483 goto out_idmap_error; 1484 nn->nfsd_versions = NULL; 1485 nn->nfsd4_minorversions = NULL; 1486 retval = nfsd_reply_cache_init(nn); 1487 if (retval) 1488 goto out_drc_error; 1489 nn->nfsd4_lease = 90; /* default lease time */ 1490 nn->nfsd4_grace = 90; 1491 nn->somebody_reclaimed = false; 1492 nn->track_reclaim_completes = false; 1493 nn->clverifier_counter = prandom_u32(); 1494 nn->clientid_base = prandom_u32(); 1495 nn->clientid_counter = nn->clientid_base + 1; 1496 nn->s2s_cp_cl_id = nn->clientid_counter++; 1497 1498 get_random_bytes(&nn->siphash_key, sizeof(nn->siphash_key)); 1499 seqlock_init(&nn->writeverf_lock); 1500 1501 atomic_set(&nn->nfs4_client_count, 0); 1502 si_meminfo(&si); 1503 max_clients = (u64)si.totalram * si.mem_unit / (1024 * 1024 * 1024); > 1504 max_clients *= NFS4_CLIENTS_PER_GB; 1505 nn->nfs4_max_clients = max_t(int, max_clients, NFS4_CLIENTS_PER_GB); 1506 1507 return 0; 1508 1509 out_drc_error: 1510 nfsd_idmap_shutdown(net); 1511 out_idmap_error: 1512 nfsd_export_shutdown(net); 1513 out_export_error: 1514 return retval; 1515 } 1516 -- 0-DAY CI Kernel Test Service https://01.org/lkp