[dhowells-fs:fscache-rewrite-indexing-2 63/64] fs/cachefiles/daemon.c:749:3: error: implicit declaration of function 'fscache_count_no_create_space'

From: kernel test robot
Date: Sat Nov 06 2021 - 20:34:01 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing-2
head: 90bb44e5d6dcd202b7443fbe2dd1f71cd408b942
commit: 0edc7fbb29e53fcbe139437c87cad28cbf444420 [63/64] fscache, cachefiles: Display stat of culling events
config: i386-randconfig-a006-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=0edc7fbb29e53fcbe139437c87cad28cbf444420
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing-2
git checkout 0edc7fbb29e53fcbe139437c87cad28cbf444420
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386

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

All errors (new ones prefixed by >>):

>> fs/cachefiles/daemon.c:749:3: error: implicit declaration of function 'fscache_count_no_create_space' [-Werror,-Wimplicit-function-declaration]
fscache_count_no_create_space();
^
1 error generated.


vim +/fscache_count_no_create_space +749 fs/cachefiles/daemon.c

60ca6a0c351881 David Howells 2021-10-21 665
a0b11a68e47b41 David Howells 2021-10-21 666 /*
a0b11a68e47b41 David Howells 2021-10-21 667 * see if we have space for a number of pages and/or a number of files in the
a0b11a68e47b41 David Howells 2021-10-21 668 * cache
a0b11a68e47b41 David Howells 2021-10-21 669 */
a0b11a68e47b41 David Howells 2021-10-21 670 int cachefiles_has_space(struct cachefiles_cache *cache,
af3cb4e444e8a9 David Howells 2021-10-21 671 unsigned fnr, unsigned bnr,
af3cb4e444e8a9 David Howells 2021-10-21 672 enum cachefiles_has_space_for reason)
a0b11a68e47b41 David Howells 2021-10-21 673 {
a0b11a68e47b41 David Howells 2021-10-21 674 struct kstatfs stats;
a0b11a68e47b41 David Howells 2021-10-21 675 int ret;
a0b11a68e47b41 David Howells 2021-10-21 676
a0b11a68e47b41 David Howells 2021-10-21 677 struct path path = {
a0b11a68e47b41 David Howells 2021-10-21 678 .mnt = cache->mnt,
a0b11a68e47b41 David Howells 2021-10-21 679 .dentry = cache->store,
a0b11a68e47b41 David Howells 2021-10-21 680 };
a0b11a68e47b41 David Howells 2021-10-21 681
a0b11a68e47b41 David Howells 2021-10-21 682 //_enter("{%llu,%llu,%llu,%llu,%llu,%llu},%u,%u",
a0b11a68e47b41 David Howells 2021-10-21 683 // (unsigned long long) cache->frun,
a0b11a68e47b41 David Howells 2021-10-21 684 // (unsigned long long) cache->fcull,
a0b11a68e47b41 David Howells 2021-10-21 685 // (unsigned long long) cache->fstop,
a0b11a68e47b41 David Howells 2021-10-21 686 // (unsigned long long) cache->brun,
a0b11a68e47b41 David Howells 2021-10-21 687 // (unsigned long long) cache->bcull,
a0b11a68e47b41 David Howells 2021-10-21 688 // (unsigned long long) cache->bstop,
a0b11a68e47b41 David Howells 2021-10-21 689 // fnr, bnr);
a0b11a68e47b41 David Howells 2021-10-21 690
a0b11a68e47b41 David Howells 2021-10-21 691 /* find out how many pages of blockdev are available */
a0b11a68e47b41 David Howells 2021-10-21 692 memset(&stats, 0, sizeof(stats));
a0b11a68e47b41 David Howells 2021-10-21 693
a0b11a68e47b41 David Howells 2021-10-21 694 ret = vfs_statfs(&path, &stats);
a0b11a68e47b41 David Howells 2021-10-21 695 if (ret < 0) {
a0b11a68e47b41 David Howells 2021-10-21 696 trace_cachefiles_vfs_error(NULL, d_inode(cache->store), ret,
a0b11a68e47b41 David Howells 2021-10-21 697 cachefiles_trace_statfs_error);
a0b11a68e47b41 David Howells 2021-10-21 698 if (ret == -EIO)
a0b11a68e47b41 David Howells 2021-10-21 699 cachefiles_io_error(cache, "statfs failed");
a0b11a68e47b41 David Howells 2021-10-21 700 _leave(" = %d", ret);
a0b11a68e47b41 David Howells 2021-10-21 701 return ret;
a0b11a68e47b41 David Howells 2021-10-21 702 }
a0b11a68e47b41 David Howells 2021-10-21 703
a0b11a68e47b41 David Howells 2021-10-21 704 stats.f_bavail >>= cache->bshift;
a0b11a68e47b41 David Howells 2021-10-21 705
a0b11a68e47b41 David Howells 2021-10-21 706 //_debug("avail %llu,%llu",
a0b11a68e47b41 David Howells 2021-10-21 707 // (unsigned long long) stats.f_ffree,
a0b11a68e47b41 David Howells 2021-10-21 708 // (unsigned long long) stats.f_bavail);
a0b11a68e47b41 David Howells 2021-10-21 709
a0b11a68e47b41 David Howells 2021-10-21 710 /* see if there is sufficient space */
a0b11a68e47b41 David Howells 2021-10-21 711 if (stats.f_ffree > fnr)
a0b11a68e47b41 David Howells 2021-10-21 712 stats.f_ffree -= fnr;
a0b11a68e47b41 David Howells 2021-10-21 713 else
a0b11a68e47b41 David Howells 2021-10-21 714 stats.f_ffree = 0;
a0b11a68e47b41 David Howells 2021-10-21 715
a0b11a68e47b41 David Howells 2021-10-21 716 if (stats.f_bavail > bnr)
a0b11a68e47b41 David Howells 2021-10-21 717 stats.f_bavail -= bnr;
a0b11a68e47b41 David Howells 2021-10-21 718 else
a0b11a68e47b41 David Howells 2021-10-21 719 stats.f_bavail = 0;
a0b11a68e47b41 David Howells 2021-10-21 720
a0b11a68e47b41 David Howells 2021-10-21 721 ret = -ENOBUFS;
a0b11a68e47b41 David Howells 2021-10-21 722 if (stats.f_ffree < cache->fstop ||
a0b11a68e47b41 David Howells 2021-10-21 723 stats.f_bavail < cache->bstop)
af3cb4e444e8a9 David Howells 2021-10-21 724 goto stop_and_begin_cull;
a0b11a68e47b41 David Howells 2021-10-21 725
a0b11a68e47b41 David Howells 2021-10-21 726 ret = 0;
a0b11a68e47b41 David Howells 2021-10-21 727 if (stats.f_ffree < cache->fcull ||
a0b11a68e47b41 David Howells 2021-10-21 728 stats.f_bavail < cache->bcull)
a0b11a68e47b41 David Howells 2021-10-21 729 goto begin_cull;
a0b11a68e47b41 David Howells 2021-10-21 730
a0b11a68e47b41 David Howells 2021-10-21 731 if (test_bit(CACHEFILES_CULLING, &cache->flags) &&
a0b11a68e47b41 David Howells 2021-10-21 732 stats.f_ffree >= cache->frun &&
a0b11a68e47b41 David Howells 2021-10-21 733 stats.f_bavail >= cache->brun &&
a0b11a68e47b41 David Howells 2021-10-21 734 test_and_clear_bit(CACHEFILES_CULLING, &cache->flags)
a0b11a68e47b41 David Howells 2021-10-21 735 ) {
a0b11a68e47b41 David Howells 2021-10-21 736 _debug("cease culling");
a0b11a68e47b41 David Howells 2021-10-21 737 cachefiles_state_changed(cache);
a0b11a68e47b41 David Howells 2021-10-21 738 }
a0b11a68e47b41 David Howells 2021-10-21 739
a0b11a68e47b41 David Howells 2021-10-21 740 //_leave(" = 0");
a0b11a68e47b41 David Howells 2021-10-21 741 return 0;
a0b11a68e47b41 David Howells 2021-10-21 742
af3cb4e444e8a9 David Howells 2021-10-21 743 stop_and_begin_cull:
af3cb4e444e8a9 David Howells 2021-10-21 744 switch (reason) {
af3cb4e444e8a9 David Howells 2021-10-21 745 case cachefiles_has_space_for_write:
af3cb4e444e8a9 David Howells 2021-10-21 746 fscache_count_no_write_space();
af3cb4e444e8a9 David Howells 2021-10-21 747 break;
af3cb4e444e8a9 David Howells 2021-10-21 748 case cachefiles_has_space_for_create:
af3cb4e444e8a9 David Howells 2021-10-21 @749 fscache_count_no_create_space();

:::::: The code at line 749 was first introduced by commit
:::::: af3cb4e444e8a9443793de5ebe3c35b445fd9bb8 fscache, cachefiles: Display stats of no-space events

:::::: TO: David Howells <dhowells@xxxxxxxxxx>
:::::: CC: David Howells <dhowells@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip