Re: [PATCH v6 1/3] bio: limit bio max size

From: kernel test robot
Date: Mon Apr 12 2021 - 01:02:56 EST


Hi Changheun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next linus/master v5.12-rc7]
[cannot apply to block/for-next next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Changheun-Lee/bio-limit-bio-max-size/20210412-115922
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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://github.com/0day-ci/linux/commit/5d00aa42f58575968c4a7a4b374addaf4f9a5624
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Changheun-Lee/bio-limit-bio-max-size/20210412-115922
git checkout 5d00aa42f58575968c4a7a4b374addaf4f9a5624
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2

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

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

In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from block/bio.c:6:
include/linux/bio.h: In function 'bio_full':
include/linux/bio.h:122:29: error: implicit declaration of function 'bio_max_size'; did you mean 'bio_max_segs'? [-Werror=implicit-function-declaration]
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
| bio_max_segs
block/bio.c: At top level:
>> block/bio.c:258:14: warning: no previous prototype for 'bio_max_size' [-Wmissing-prototypes]
258 | unsigned int bio_max_size(struct bio *bio)
| ^~~~~~~~~~~~
>> block/bio.c:258:14: error: conflicting types for 'bio_max_size'
In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from block/bio.c:6:
include/linux/bio.h:122:29: note: previous implicit declaration of 'bio_max_size' was here
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
block/bio.c: In function 'bio_max_size':
>> block/bio.c:260:31: error: 'struct bio' has no member named 'bi_disk'
260 | struct request_queue *q = bio->bi_disk->queue;
| ^~
cc1: some warnings being treated as errors


vim +/bio_max_size +258 block/bio.c

257
> 258 unsigned int bio_max_size(struct bio *bio)
259 {
> 260 struct request_queue *q = bio->bi_disk->queue;
261
262 if (blk_queue_limit_bio_size(q))
263 return blk_queue_get_max_sectors(q, bio_op(bio))
264 << SECTOR_SHIFT;
265
266 return UINT_MAX;
267 }
268

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip