Re: [PATCH v2 3/3] xfs: Let the max iomap length be consistent with the writeback code
From: kernel test robot
Date: Wed Oct 09 2024 - 04:27:59 EST
Hi Tang,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on brauner-vfs/vfs.all xfs-linux/for-next linus/master v6.12-rc2 next-20241008]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Tang-Yizhou/mm-page-writeback-c-Rename-BANDWIDTH_INTERVAL-to-BW_DIRTYLIMIT_INTERVAL/20241006-225445
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20241006152849.247152-4-yizhou.tang%40shopee.com
patch subject: [PATCH v2 3/3] xfs: Let the max iomap length be consistent with the writeback code
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241009/202410091647.eyo14ayt-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241009/202410091647.eyo14ayt-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410091647.eyo14ayt-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
fs/xfs/xfs_iomap.c: In function 'xfs_max_map_length':
fs/xfs/xfs_iomap.c:768:14: error: implicit declaration of function 'inode_to_wb' [-Wimplicit-function-declaration]
768 | wb = inode_to_wb(wb);
| ^~~~~~~~~~~
>> fs/xfs/xfs_iomap.c:768:12: error: assignment to 'struct bdi_writeback *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
768 | wb = inode_to_wb(wb);
| ^
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
vim +768 fs/xfs/xfs_iomap.c
748
749 /*
750 * We cap the maximum length we map to a sane size to keep the chunks
751 * of work done where somewhat symmetric with the work writeback does.
752 * This is a completely arbitrary number pulled out of thin air as a
753 * best guess for initial testing.
754 *
755 * Following the logic of writeback_chunk_size(), the length will be
756 * rounded to the nearest 4MB boundary.
757 *
758 * Note that the values needs to be less than 32-bits wide until the
759 * lower level functions are updated.
760 */
761 static loff_t
762 xfs_max_map_length(struct inode *inode, loff_t length)
763 {
764 struct bdi_writeback *wb;
765 long pages;
766
767 spin_lock(&inode->i_lock);
> 768 wb = inode_to_wb(wb);
769 pages = min(wb->avg_write_bandwidth / 2,
770 global_wb_domain.dirty_limit / DIRTY_SCOPE);
771 spin_unlock(&inode->i_lock);
772 pages = round_down(pages + MIN_WRITEBACK_PAGES, MIN_WRITEBACK_PAGES);
773
774 return min_t(loff_t, length, pages * PAGE_SIZE);
775 }
776
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki