[linux-next:master 10517/10906] fs/nfsd/nfsctl.c:1504:24: error: 'NFS4_CLIENTS_PER_GB' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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 <lkp@xxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux