From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5861140779120003981==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [hch-block:delete-write-same.5 7/8] drivers/block/loop.c:784:17: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? Date: Sat, 15 Jan 2022 02:03:15 +0800 Message-ID: <202201150150.oeDbdzye-lkp@intel.com> List-Id: --===============5861140779120003981== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: git://git.infradead.org/users/hch/block.git delete-write-same.5 head: e6a05a99f46ef909822031d28dfbcd1a7c9cfb56 commit: 4eeaaa4ec1e82312848c5bc48584de3247743df6 [7/8] block: remove REQ_OP= _WRITE_SAME support config: riscv-randconfig-r042-20220113 (https://download.01.org/0day-ci/arc= hive/20220115/202201150150.oeDbdzye-lkp(a)intel.com/config) compiler: riscv64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git remote add hch-block git://git.infradead.org/users/hch/block.git git fetch --no-tags hch-block delete-write-same.5 git checkout 4eeaaa4ec1e82312848c5bc48584de3247743df6 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash drivers/block/ drivers/nvme/h= ost/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/block/loop.c: In function 'loop_config_discard': >> drivers/block/loop.c:784:17: error: implicit declaration of function 'bl= k_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_= sectors'? [-Werror=3Dimplicit-function-declaration] 784 | blk_queue_max_write_zeroes_sectors(q, max_discar= d_sectors); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | blk_queue_max_zone_append_sectors cc1: some warnings being treated as errors -- drivers/block/virtio_blk.c: In function 'virtblk_probe': >> drivers/block/virtio_blk.c:938:17: error: implicit declaration of functi= on 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_a= ppend_sectors'? [-Werror=3Dimplicit-function-declaration] 938 | blk_queue_max_write_zeroes_sectors(q, v ? v : UI= NT_MAX); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | blk_queue_max_zone_append_sectors cc1: some warnings being treated as errors -- drivers/nvme/host/core.c: In function 'nvme_config_discard': >> drivers/nvme/host/core.c:1682:17: error: implicit declaration of functio= n 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_ap= pend_sectors'? [-Werror=3Dimplicit-function-declaration] 1682 | blk_queue_max_write_zeroes_sectors(queue, UINT_M= AX); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | blk_queue_max_zone_append_sectors cc1: some warnings being treated as errors vim +784 drivers/block/loop.c ee86273062cbb3 Milan Broz 2010-08-23 746 = dfaa2ef68e80c3 Lukas Czerner 2011-08-19 747 static void loop_config_d= iscard(struct loop_device *lo) dfaa2ef68e80c3 Lukas Czerner 2011-08-19 748 { dfaa2ef68e80c3 Lukas Czerner 2011-08-19 749 struct file *file =3D lo= ->lo_backing_file; dfaa2ef68e80c3 Lukas Czerner 2011-08-19 750 struct inode *inode =3D = file->f_mapping->host; dfaa2ef68e80c3 Lukas Czerner 2011-08-19 751 struct request_queue *q = =3D lo->lo_queue; bcb21c8cc99472 Ming Lei 2020-08-17 752 u32 granularity, max_dis= card_sectors; dfaa2ef68e80c3 Lukas Czerner 2011-08-19 753 = c52abf563049e7 Evan Green 2020-04-03 754 /* c52abf563049e7 Evan Green 2020-04-03 755 * If the backing device= is a block device, mirror its zeroing c52abf563049e7 Evan Green 2020-04-03 756 * capability. Set the d= iscard sectors to the block device's zeroing c52abf563049e7 Evan Green 2020-04-03 757 * capabilities because = loop discards result in blkdev_issue_zeroout(), c52abf563049e7 Evan Green 2020-04-03 758 * not blkdev_issue_disc= ard(). This maintains consistent behavior with c52abf563049e7 Evan Green 2020-04-03 759 * file-backed loop devi= ces: discarded regions read back as zero. c52abf563049e7 Evan Green 2020-04-03 760 */ 47e9624616c80c Christoph Hellwig 2021-10-19 761 if (S_ISBLK(inode->i_mod= e)) { 4e7b5671c6a883 Christoph Hellwig 2020-11-23 762 struct request_queue *b= ackingq =3D bdev_get_queue(I_BDEV(inode)); c52abf563049e7 Evan Green 2020-04-03 763 = bcb21c8cc99472 Ming Lei 2020-08-17 764 max_discard_sectors =3D= backingq->limits.max_write_zeroes_sectors; bcb21c8cc99472 Ming Lei 2020-08-17 765 granularity =3D backing= q->limits.discard_granularity ?: bcb21c8cc99472 Ming Lei 2020-08-17 766 queue_physical_block_s= ize(backingq); c52abf563049e7 Evan Green 2020-04-03 767 = dfaa2ef68e80c3 Lukas Czerner 2011-08-19 768 /* dfaa2ef68e80c3 Lukas Czerner 2011-08-19 769 * We use punch hole to = reclaim the free space used by the 47e9624616c80c Christoph Hellwig 2021-10-19 770 * image a.k.a. discard. dfaa2ef68e80c3 Lukas Czerner 2011-08-19 771 */ 47e9624616c80c Christoph Hellwig 2021-10-19 772 } else if (!file->f_op->= fallocate) { bcb21c8cc99472 Ming Lei 2020-08-17 773 max_discard_sectors =3D= 0; bcb21c8cc99472 Ming Lei 2020-08-17 774 granularity =3D 0; dfaa2ef68e80c3 Lukas Czerner 2011-08-19 775 = c52abf563049e7 Evan Green 2020-04-03 776 } else { bcb21c8cc99472 Ming Lei 2020-08-17 777 max_discard_sectors =3D= UINT_MAX >> 9; bcb21c8cc99472 Ming Lei 2020-08-17 778 granularity =3D inode->= i_sb->s_blocksize; c52abf563049e7 Evan Green 2020-04-03 779 } c52abf563049e7 Evan Green 2020-04-03 780 = bcb21c8cc99472 Ming Lei 2020-08-17 781 if (max_discard_sectors)= { bcb21c8cc99472 Ming Lei 2020-08-17 782 q->limits.discard_granu= larity =3D granularity; bcb21c8cc99472 Ming Lei 2020-08-17 783 blk_queue_max_discard_s= ectors(q, max_discard_sectors); bcb21c8cc99472 Ming Lei 2020-08-17 @784 blk_queue_max_write_zer= oes_sectors(q, max_discard_sectors); 8b904b5b6b58b9 Bart Van Assche 2018-03-07 785 blk_queue_flag_set(QUEU= E_FLAG_DISCARD, q); bcb21c8cc99472 Ming Lei 2020-08-17 786 } else { bcb21c8cc99472 Ming Lei 2020-08-17 787 q->limits.discard_granu= larity =3D 0; bcb21c8cc99472 Ming Lei 2020-08-17 788 blk_queue_max_discard_s= ectors(q, 0); bcb21c8cc99472 Ming Lei 2020-08-17 789 blk_queue_max_write_zer= oes_sectors(q, 0); c52abf563049e7 Evan Green 2020-04-03 790 blk_queue_flag_clear(QU= EUE_FLAG_DISCARD, q); dfaa2ef68e80c3 Lukas Czerner 2011-08-19 791 } bcb21c8cc99472 Ming Lei 2020-08-17 792 q->limits.discard_alignm= ent =3D 0; bcb21c8cc99472 Ming Lei 2020-08-17 793 } dfaa2ef68e80c3 Lukas Czerner 2011-08-19 794 = :::::: The code at line 784 was first introduced by commit :::::: bcb21c8cc9947286211327d663ace69f07d37a76 block: loop: set discard gr= anularity and alignment for block device backed loop :::::: TO: Ming Lei :::::: CC: Jens Axboe --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5861140779120003981==--