[cgroup:review-iow-v2 13/13] block/blk-ioweight.c:1587:10: error: 'struct iow' has no member named 'cost_prog'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-iow-v2
head:   472d5c4de9dcc31b6599069c615efb00792bf6d1
commit: 472d5c4de9dcc31b6599069c615efb00792bf6d1 [13/13] blkcg: implement BPF_PROG_TYPE_IO_COST
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 472d5c4de9dcc31b6599069c615efb00792bf6d1
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   block/blk-ioweight.c: In function 'calc_vtime_cost_bpf':
>> block/blk-ioweight.c:1587:10: error: 'struct iow' has no member named 'cost_prog'
     if (!iow->cost_prog)
             ^~
   In file included from include/linux/rbtree.h:22:0,
                    from include/linux/mm_types.h:10,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:13,
                    from block/blk-ioweight.c:177:
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/rcupdate.h:312:10: note: in definition of macro '__rcu_dereference_check'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
             ^
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/rcupdate.h:312:36: note: in definition of macro '__rcu_dereference_check'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                       ^
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:11:0,
                    from block/blk-ioweight.c:176:
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/compiler.h:256:17: note: in definition of macro '__READ_ONCE'
     union { typeof(x) __val; char __c[1]; } __u;   \
                    ^
>> include/linux/rcupdate.h:312:48: note: in expansion of macro 'READ_ONCE'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                   ^~~~~~~~~
   include/linux/rcupdate.h:450:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/compiler.h:258:22: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                         ^
>> include/linux/rcupdate.h:312:48: note: in expansion of macro 'READ_ONCE'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                   ^~~~~~~~~
   include/linux/rcupdate.h:450:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/compiler.h:258:42: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                                             ^
>> include/linux/rcupdate.h:312:48: note: in expansion of macro 'READ_ONCE'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                   ^~~~~~~~~
   include/linux/rcupdate.h:450:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/compiler.h:260:30: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                 ^
>> include/linux/rcupdate.h:312:48: note: in expansion of macro 'READ_ONCE'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                   ^~~~~~~~~
   include/linux/rcupdate.h:450:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/compiler.h:260:50: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                                     ^
>> include/linux/rcupdate.h:312:48: note: in expansion of macro 'READ_ONCE'
     typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
                                                   ^~~~~~~~~
   include/linux/rcupdate.h:450:2: note: in expansion of macro '__rcu_dereference_check'
     __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
     ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   In file included from include/linux/rbtree.h:22:0,
                    from include/linux/mm_types.h:10,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:13,
                    from block/blk-ioweight.c:177:
   block/blk-ioweight.c:1591:28: error: 'struct iow' has no member named 'cost_prog'
     prog = rcu_dereference(iow->cost_prog);
                               ^
   include/linux/rcupdate.h:315:12: note: in definition of macro '__rcu_dereference_check'
     ((typeof(*p) __force __kernel *)(________p1)); \
               ^
   include/linux/rcupdate.h:508:28: note: in expansion of macro 'rcu_dereference_check'
    #define rcu_dereference(p) rcu_dereference_check(p, 0)
                               ^~~~~~~~~~~~~~~~~~~~~
>> block/blk-ioweight.c:1591:9: note: in expansion of macro 'rcu_dereference'
     prog = rcu_dereference(iow->cost_prog);
            ^~~~~~~~~~~~~~~
   block/blk-ioweight.c: In function 'blk_bpf_io_cost_ioctl':
   block/blk-ioweight.c:2479:11: error: 'struct iow' has no member named 'cost_prog'
      if (!iow->cost_prog) {
              ^~
   In file included from include/linux/kernel.h:11:0,
                    from block/blk-ioweight.c:176:
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:281:17: note: in definition of macro 'WRITE_ONCE'
     union { typeof(x) __val; char __c[1]; } __u = \
                    ^
>> block/blk-ioweight.c:2480:4: note: in expansion of macro 'rcu_assign_pointer'
       rcu_assign_pointer(iow->cost_prog, prog);
       ^~~~~~~~~~~~~~~~~~
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:282:30: note: in definition of macro 'WRITE_ONCE'
      { .__val = (__force typeof(x)) (val) }; \
                                 ^
>> block/blk-ioweight.c:2480:4: note: in expansion of macro 'rcu_assign_pointer'
       rcu_assign_pointer(iow->cost_prog, prog);
       ^~~~~~~~~~~~~~~~~~
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:282:35: note: in definition of macro 'WRITE_ONCE'
      { .__val = (__force typeof(x)) (val) }; \
                                      ^~~
>> block/blk-ioweight.c:2480:4: note: in expansion of macro 'rcu_assign_pointer'
       rcu_assign_pointer(iow->cost_prog, prog);
       ^~~~~~~~~~~~~~~~~~
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:283:22: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                         ^
>> block/blk-ioweight.c:2480:4: note: in expansion of macro 'rcu_assign_pointer'
       rcu_assign_pointer(iow->cost_prog, prog);
       ^~~~~~~~~~~~~~~~~~
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:283:42: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                                             ^
>> block/blk-ioweight.c:2480:4: note: in expansion of macro 'rcu_assign_pointer'
       rcu_assign_pointer(iow->cost_prog, prog);
       ^~~~~~~~~~~~~~~~~~
   block/blk-ioweight.c:2480:26: error: 'struct iow' has no member named 'cost_prog'
       rcu_assign_pointer(iow->cost_prog, prog);
                             ^
   include/linux/compiler.h:325:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler.h:345:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:348:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~

vim +1587 block/blk-ioweight.c

  1578	
  1579	#ifdef CONFIG_BLK_BPF_IO_COST
  1580	static bool calc_vtime_cost_bpf(struct bio *bio, struct iow_gq *iowg,
  1581					bool is_merge, u64 *costp)
  1582	{
  1583		struct iow *iow = iowg->iow;
  1584		struct bpf_prog *prog;
  1585		bool ret = false;
  1586	
> 1587		if (!iow->cost_prog)
  1588			return ret;
  1589	
  1590		rcu_read_lock();
> 1591		prog = rcu_dereference(iow->cost_prog);
  1592		if (prog) {
  1593			struct bpf_io_cost ctx = {
  1594				.cost = 0,
  1595				.opf = bio->bi_opf,
  1596				.nr_sectors = bio_sectors(bio),
  1597				.sector = bio->bi_iter.bi_sector,
  1598				.last_sector = iowg->cursor,
  1599				.is_merge = is_merge,
  1600			};
  1601	
  1602			BPF_PROG_RUN(prog, &ctx);
  1603			*costp = ctx.cost;
  1604			ret = true;
  1605		}
  1606		rcu_read_unlock();
  1607	
  1608		return ret;
  1609	}
  1610	#else
  1611	static bool calc_vtime_cost_bpf(struct bio *bio, struct iow_gq *iowg,
  1612					bool is_merge, u64 *costp)
  1613	{
  1614		return false;
  1615	}
  1616	#endif
  1617	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux