All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
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	[thread overview]
Message-ID: <202201150150.oeDbdzye-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7238 bytes --]

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/archive/20220115/202201150150.oeDbdzye-lkp(a)intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.2.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
        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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/block/ drivers/nvme/host/

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

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 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
     784 |                 blk_queue_max_write_zeroes_sectors(q, max_discard_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 function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
     938 |                 blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_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 function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
    1682 |                 blk_queue_max_write_zeroes_sectors(queue, UINT_MAX);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 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_discard(struct loop_device *lo)
dfaa2ef68e80c3 Lukas Czerner     2011-08-19  748  {
dfaa2ef68e80c3 Lukas Czerner     2011-08-19  749  	struct file *file = lo->lo_backing_file;
dfaa2ef68e80c3 Lukas Czerner     2011-08-19  750  	struct inode *inode = file->f_mapping->host;
dfaa2ef68e80c3 Lukas Czerner     2011-08-19  751  	struct request_queue *q = lo->lo_queue;
bcb21c8cc99472 Ming Lei          2020-08-17  752  	u32 granularity, max_discard_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 discard 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_discard(). This maintains consistent behavior with
c52abf563049e7 Evan Green        2020-04-03  759  	 * file-backed loop devices: 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_mode)) {
4e7b5671c6a883 Christoph Hellwig 2020-11-23  762  		struct request_queue *backingq = bdev_get_queue(I_BDEV(inode));
c52abf563049e7 Evan Green        2020-04-03  763  
bcb21c8cc99472 Ming Lei          2020-08-17  764  		max_discard_sectors = backingq->limits.max_write_zeroes_sectors;
bcb21c8cc99472 Ming Lei          2020-08-17  765  		granularity = backingq->limits.discard_granularity ?:
bcb21c8cc99472 Ming Lei          2020-08-17  766  			queue_physical_block_size(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 = 0;
bcb21c8cc99472 Ming Lei          2020-08-17  774  		granularity = 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 = UINT_MAX >> 9;
bcb21c8cc99472 Ming Lei          2020-08-17  778  		granularity = 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_granularity = granularity;
bcb21c8cc99472 Ming Lei          2020-08-17  783  		blk_queue_max_discard_sectors(q, max_discard_sectors);
bcb21c8cc99472 Ming Lei          2020-08-17 @784  		blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
8b904b5b6b58b9 Bart Van Assche   2018-03-07  785  		blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
bcb21c8cc99472 Ming Lei          2020-08-17  786  	} else {
bcb21c8cc99472 Ming Lei          2020-08-17  787  		q->limits.discard_granularity = 0;
bcb21c8cc99472 Ming Lei          2020-08-17  788  		blk_queue_max_discard_sectors(q, 0);
bcb21c8cc99472 Ming Lei          2020-08-17  789  		blk_queue_max_write_zeroes_sectors(q, 0);
c52abf563049e7 Evan Green        2020-04-03  790  		blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q);
dfaa2ef68e80c3 Lukas Czerner     2011-08-19  791  	}
bcb21c8cc99472 Ming Lei          2020-08-17  792  	q->limits.discard_alignment = 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 granularity and alignment for block device backed loop

:::::: TO: Ming Lei <ming.lei@redhat.com>
:::::: CC: Jens Axboe <axboe@kernel.dk>

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

                 reply	other threads:[~2022-01-14 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201150150.oeDbdzye-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.