tree:
git://git.infradead.org/users/hch/misc.git dax-devirtualize
head: 7a0a944e2b374048589e83456809514d5961b624
commit: 7a0a944e2b374048589e83456809514d5961b624 [17/17] dax: remove the copy_from_iter
and copy_to_iter methods
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dax-devirtualize
git checkout 7a0a944e2b374048589e83456809514d5961b624
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/md/dm-log-writes.c:907:12: error: 'log_dax'
defined but not used [-Werror=unused-function]
907 | static int log_dax(struct
log_writes_c *lc, sector_t sector, size_t bytes,
| ^~~~~~~
cc1: all warnings being treated as errors
vim +/log_dax +907 drivers/md/dm-log-writes.c
0e9cebe724597a Josef Bacik 2015-03-20 905
8b9db232db1b88 Christoph Hellwig 2021-10-15 906 #if IS_ENABLED(CONFIG_FS_DAX)
976431b02c2ef9 Dan Williams 2018-03-29 @907 static int log_dax(struct log_writes_c
*lc, sector_t sector, size_t bytes,
976431b02c2ef9 Dan Williams 2018-03-29 908 struct iov_iter *i)
976431b02c2ef9 Dan Williams 2018-03-29 909 {
976431b02c2ef9 Dan Williams 2018-03-29 910 struct pending_block *block;
976431b02c2ef9 Dan Williams 2018-03-29 911
976431b02c2ef9 Dan Williams 2018-03-29 912 if (!bytes)
976431b02c2ef9 Dan Williams 2018-03-29 913 return 0;
976431b02c2ef9 Dan Williams 2018-03-29 914
976431b02c2ef9 Dan Williams 2018-03-29 915 block = kzalloc(sizeof(struct
pending_block), GFP_KERNEL);
976431b02c2ef9 Dan Williams 2018-03-29 916 if (!block) {
976431b02c2ef9 Dan Williams 2018-03-29 917 DMERR("Error allocating dax
pending block");
976431b02c2ef9 Dan Williams 2018-03-29 918 return -ENOMEM;
976431b02c2ef9 Dan Williams 2018-03-29 919 }
976431b02c2ef9 Dan Williams 2018-03-29 920
976431b02c2ef9 Dan Williams 2018-03-29 921 block->data = kzalloc(bytes,
GFP_KERNEL);
976431b02c2ef9 Dan Williams 2018-03-29 922 if (!block->data) {
976431b02c2ef9 Dan Williams 2018-03-29 923 DMERR("Error allocating dax data
space");
976431b02c2ef9 Dan Williams 2018-03-29 924 kfree(block);
976431b02c2ef9 Dan Williams 2018-03-29 925 return -ENOMEM;
976431b02c2ef9 Dan Williams 2018-03-29 926 }
976431b02c2ef9 Dan Williams 2018-03-29 927
976431b02c2ef9 Dan Williams 2018-03-29 928 /* write data provided via the iterator
*/
976431b02c2ef9 Dan Williams 2018-03-29 929 if (!copy_from_iter(block->data,
bytes, i)) {
976431b02c2ef9 Dan Williams 2018-03-29 930 DMERR("Error copying dax
data");
976431b02c2ef9 Dan Williams 2018-03-29 931 kfree(block->data);
976431b02c2ef9 Dan Williams 2018-03-29 932 kfree(block);
976431b02c2ef9 Dan Williams 2018-03-29 933 return -EIO;
976431b02c2ef9 Dan Williams 2018-03-29 934 }
976431b02c2ef9 Dan Williams 2018-03-29 935
976431b02c2ef9 Dan Williams 2018-03-29 936 /* rewind the iterator so that the
block driver can use it */
976431b02c2ef9 Dan Williams 2018-03-29 937 iov_iter_revert(i, bytes);
976431b02c2ef9 Dan Williams 2018-03-29 938
976431b02c2ef9 Dan Williams 2018-03-29 939 block->datalen = bytes;
976431b02c2ef9 Dan Williams 2018-03-29 940 block->sector =
bio_to_dev_sectors(lc, sector);
976431b02c2ef9 Dan Williams 2018-03-29 941 block->nr_sectors = ALIGN(bytes,
lc->sectorsize) >> lc->sectorshift;
976431b02c2ef9 Dan Williams 2018-03-29 942
976431b02c2ef9 Dan Williams 2018-03-29 943
atomic_inc(&lc->pending_blocks);
976431b02c2ef9 Dan Williams 2018-03-29 944
spin_lock_irq(&lc->blocks_lock);
976431b02c2ef9 Dan Williams 2018-03-29 945 list_add_tail(&block->list,
&lc->unflushed_blocks);
976431b02c2ef9 Dan Williams 2018-03-29 946
spin_unlock_irq(&lc->blocks_lock);
976431b02c2ef9 Dan Williams 2018-03-29 947 wake_up_process(lc->log_kthread);
976431b02c2ef9 Dan Williams 2018-03-29 948
976431b02c2ef9 Dan Williams 2018-03-29 949 return 0;
976431b02c2ef9 Dan Williams 2018-03-29 950 }
976431b02c2ef9 Dan Williams 2018-03-29 951
:::::: The code at line 907 was first introduced by commit
:::::: 976431b02c2ef92ae3f8b6a7d699fc554025e118 dax, dm: allow device-mapper to operate
without dax support
:::::: TO: Dan Williams <dan.j.williams(a)intel.com>
:::::: CC: Dan Williams <dan.j.williams(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org