Hi Matthew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on linus/master v5.7-rc1 next-20200414]
[cannot apply to ext4/dev f2fs/dev-test]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Matthew-Wilcox/Change-readahead-...
base:
https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/fuse/fuse_i.h:17,
from fs/fuse/file.c:9:
fs/fuse/file.c: In function 'fuse_readahead':
include/linux/kernel.h:842:29: warning: comparison of distinct pointer types lacks a
cast
842 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/kernel.h:856:4: note: in expansion of macro '__typecheck'
856 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
866 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
> fs/fuse/file.c:927:14: note: in expansion of macro 'min'
927 | max_pages = min(fc->max_pages, fc->max_read / PAGE_SIZE);
| ^~~
vim +/min +927 fs/fuse/file.c
917
918 static void fuse_readahead(struct readahead_control *rac)
919 {
920 struct inode *inode = rac->mapping->host;
921 struct fuse_conn *fc = get_fuse_conn(inode);
922 unsigned int i, max_pages, nr_pages = 0;
923
924 if (is_bad_inode(inode))
925 return;
926
927 max_pages = min(fc->max_pages, fc->max_read / PAGE_SIZE);
928
929 for (;;) {
930 struct fuse_io_args *ia;
931 struct fuse_args_pages *ap;
932
933 nr_pages = readahead_count(rac) - nr_pages;
934 if (nr_pages > max_pages)
935 nr_pages = max_pages;
936 if (nr_pages == 0)
937 break;
938 ia = fuse_io_alloc(NULL, nr_pages);
939 if (!ia)
940 return;
941 ap = &ia->ap;
942 nr_pages = __readahead_batch(rac, ap->pages, nr_pages);
943 for (i = 0; i < nr_pages; i++) {
944 fuse_wait_on_page_writeback(inode,
945 readahead_index(rac) + i);
946 ap->descs[i].length = PAGE_SIZE;
947 }
948 ap->num_pages = nr_pages;
949 fuse_send_readpages(ia, rac->file);
950 }
951 }
952
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org