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: hexagon-randconfig-r045-20220113
(
https://download.01.org/0day-ci/archive/20220115/202201150229.DHF8ezE1-lk...)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
82c8aca93488730ce8f66101e0f3538f14b551dd)
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=clang make.cross W=1 O=build_dir
ARCH=hexagon SHELL=/bin/bash drivers/block/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/block/loop.c:784:3: error: implicit declaration of
function 'blk_queue_max_write_zeroes_sectors'
[-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
^
drivers/block/loop.c:789:3: error: implicit declaration of function
'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, 0);
^
2 errors generated.
--
> drivers/block/virtio_blk.c:938:3: error: implicit declaration of
function 'blk_queue_max_write_zeroes_sectors'
[-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX);
^
1 error generated.
--
> drivers/block/rbd.c:4948:3: error: implicit declaration of
function 'blk_queue_max_write_zeroes_sectors'
[-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, objset_bytes >> SECTOR_SHIFT);
^
1 error generated.
--
> drivers/block/zram/zram_drv.c:1983:3: error: implicit declaration
of function 'blk_queue_max_write_zeroes_sectors'
[-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(zram->disk->queue, UINT_MAX);
^
1 error generated.
vim +/blk_queue_max_write_zeroes_sectors +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(a)redhat.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org