LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [dhowells-fs:netfs-folio-regions 13/36] fs/ceph/addr.c:310:3: error: 'const struct netfs_request_ops' has no member named 'is_cache_enabled'
@ 2021-08-31 13:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-31 13:14 UTC (permalink / raw)
  To: David Howells; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 10350 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head:   2f3fe780e9a44691136170536363c701b527d0e8
commit: 7261c29990677f14498f0aa1749db277a581b9c3 [13/36] netfs: Add a netfs inode context
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):
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=7261c29990677f14498f0aa1749db277a581b9c3
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs netfs-folio-regions
        git checkout 7261c29990677f14498f0aa1749db277a581b9c3
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> fs/ceph/addr.c:310:3: error: 'const struct netfs_request_ops' has no member named 'is_cache_enabled'
     310 |  .is_cache_enabled = ceph_is_cache_enabled,
         |   ^~~~~~~~~~~~~~~~
>> fs/ceph/addr.c:310:22: error: initialization of 'int (*)(struct netfs_read_request *)' from incompatible pointer type 'bool (*)(struct inode *)' {aka '_Bool (*)(struct inode *)'} [-Werror=incompatible-pointer-types]
     310 |  .is_cache_enabled = ceph_is_cache_enabled,
         |                      ^~~~~~~~~~~~~~~~~~~~~
   fs/ceph/addr.c:310:22: note: (near initialization for 'ceph_netfs_read_ops.begin_cache_operation')
   fs/ceph/addr.c:311:27: warning: initialized field overwritten [-Woverride-init]
     311 |  .begin_cache_operation = ceph_begin_cache_operation,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ceph/addr.c:311:27: note: (near initialization for 'ceph_netfs_read_ops.begin_cache_operation')
   fs/ceph/addr.c: In function 'ceph_readpage':
>> fs/ceph/addr.c:347:30: error: passing argument 2 of 'netfs_readpage' from incompatible pointer type [-Werror=incompatible-pointer-types]
     347 |  return netfs_readpage(file, folio, &ceph_netfs_read_ops, NULL);
         |                              ^~~~~
         |                              |
         |                              struct folio *
   In file included from fs/ceph/addr.c:15:
   include/linux/netfs.h:258:42: note: expected 'struct page *' but argument is of type 'struct folio *'
     258 | extern int netfs_readpage(struct file *, struct page *);
         |                                          ^~~~~~~~~~~~~
>> fs/ceph/addr.c:347:9: error: too many arguments to function 'netfs_readpage'
     347 |  return netfs_readpage(file, folio, &ceph_netfs_read_ops, NULL);
         |         ^~~~~~~~~~~~~~
   In file included from fs/ceph/addr.c:15:
   include/linux/netfs.h:258:12: note: declared here
     258 | extern int netfs_readpage(struct file *, struct page *);
         |            ^~~~~~~~~~~~~~
   fs/ceph/addr.c: In function 'ceph_readahead':
>> fs/ceph/addr.c:378:2: error: too many arguments to function 'netfs_readahead'
     378 |  netfs_readahead(ractl, &ceph_netfs_read_ops, (void *)(uintptr_t)got);
         |  ^~~~~~~~~~~~~~~
   In file included from fs/ceph/addr.c:15:
   include/linux/netfs.h:257:13: note: declared here
     257 | extern void netfs_readahead(struct readahead_control *);
         |             ^~~~~~~~~~~~~~~
   fs/ceph/addr.c: In function 'ceph_write_begin':
>> fs/ceph/addr.c:1260:6: error: too many arguments to function 'netfs_write_begin'
    1260 |  r = netfs_write_begin(file, inode->i_mapping, pos, len, 0, &folio, NULL,
         |      ^~~~~~~~~~~~~~~~~
   In file included from fs/ceph/addr.c:15:
   include/linux/netfs.h:259:12: note: declared here
     259 | extern int netfs_write_begin(struct file *, struct address_space *,
         |            ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PHY_SPARX5_SERDES
   Depends on (ARCH_SPARX5 || COMPILE_TEST && OF && HAS_IOMEM
   Selected by
   - SPARX5_SWITCH && NETDEVICES && ETHERNET && NET_VENDOR_MICROCHIP && NET_SWITCHDEV && HAS_IOMEM && OF


vim +310 fs/ceph/addr.c

49870056005ca938 Jeff Layton   2020-07-09  307  
7261c29990677f14 David Howells 2021-06-29  308  static const struct netfs_request_ops ceph_netfs_read_ops = {
f0702876e152f044 Jeff Layton   2020-06-01  309  	.init_rreq		= ceph_init_rreq,
f0702876e152f044 Jeff Layton   2020-06-01 @310  	.is_cache_enabled	= ceph_is_cache_enabled,
f0702876e152f044 Jeff Layton   2020-06-01  311  	.begin_cache_operation	= ceph_begin_cache_operation,
f0702876e152f044 Jeff Layton   2020-06-01  312  	.issue_op		= ceph_netfs_issue_op,
f0702876e152f044 Jeff Layton   2020-06-01  313  	.expand_readahead	= ceph_netfs_expand_readahead,
f0702876e152f044 Jeff Layton   2020-06-01  314  	.clamp_length		= ceph_netfs_clamp_length,
d801327d9500c746 Jeff Layton   2020-06-05  315  	.check_write_begin	= ceph_netfs_check_write_begin,
49870056005ca938 Jeff Layton   2020-07-09  316  	.cleanup		= ceph_readahead_cleanup,
f0702876e152f044 Jeff Layton   2020-06-01  317  };
f0702876e152f044 Jeff Layton   2020-06-01  318  
f0702876e152f044 Jeff Layton   2020-06-01  319  /* read a single page, without unlocking it. */
f8a58a6c5116593f David Howells 2021-08-11  320  static int ceph_readpage(struct file *file, struct page *subpage)
f0702876e152f044 Jeff Layton   2020-06-01  321  {
f8a58a6c5116593f David Howells 2021-08-11  322  	struct folio *folio = page_folio(subpage);
f0702876e152f044 Jeff Layton   2020-06-01  323  	struct inode *inode = file_inode(file);
f0702876e152f044 Jeff Layton   2020-06-01  324  	struct ceph_inode_info *ci = ceph_inode(inode);
f0702876e152f044 Jeff Layton   2020-06-01  325  	struct ceph_vino vino = ceph_vino(inode);
f8a58a6c5116593f David Howells 2021-08-11  326  	size_t len = folio_size(folio);
f8a58a6c5116593f David Howells 2021-08-11  327  	u64 off = folio_file_pos(folio);
f0702876e152f044 Jeff Layton   2020-06-01  328  
f0702876e152f044 Jeff Layton   2020-06-01  329  	if (ci->i_inline_version != CEPH_INLINE_NONE) {
f0702876e152f044 Jeff Layton   2020-06-01  330  		/*
f0702876e152f044 Jeff Layton   2020-06-01  331  		 * Uptodate inline data should have been added
f0702876e152f044 Jeff Layton   2020-06-01  332  		 * into page cache while getting Fcr caps.
f0702876e152f044 Jeff Layton   2020-06-01  333  		 */
f0702876e152f044 Jeff Layton   2020-06-01  334  		if (off == 0) {
f8a58a6c5116593f David Howells 2021-08-11  335  			folio_unlock(folio);
f0702876e152f044 Jeff Layton   2020-06-01  336  			return -EINVAL;
f0702876e152f044 Jeff Layton   2020-06-01  337  		}
f8a58a6c5116593f David Howells 2021-08-11  338  		zero_user_segment(&folio->page, 0, folio_size(folio));
f8a58a6c5116593f David Howells 2021-08-11  339  		folio_mark_uptodate(folio);
f8a58a6c5116593f David Howells 2021-08-11  340  		folio_unlock(folio);
f0702876e152f044 Jeff Layton   2020-06-01  341  		return 0;
f0702876e152f044 Jeff Layton   2020-06-01  342  	}
f0702876e152f044 Jeff Layton   2020-06-01  343  
f8a58a6c5116593f David Howells 2021-08-11  344  	dout("readpage ino %llx.%llx file %p off %llu len %zu folio %p index %lu\n",
f8a58a6c5116593f David Howells 2021-08-11  345  	     vino.ino, vino.snap, file, off, len, folio, folio_index(folio));
f0702876e152f044 Jeff Layton   2020-06-01  346  
f8a58a6c5116593f David Howells 2021-08-11 @347  	return netfs_readpage(file, folio, &ceph_netfs_read_ops, NULL);
f0702876e152f044 Jeff Layton   2020-06-01  348  }
f0702876e152f044 Jeff Layton   2020-06-01  349  
49870056005ca938 Jeff Layton   2020-07-09  350  static void ceph_readahead(struct readahead_control *ractl)
1d3576fd10f0d7a1 Sage Weil     2009-10-06  351  {
49870056005ca938 Jeff Layton   2020-07-09  352  	struct inode *inode = file_inode(ractl->file);
49870056005ca938 Jeff Layton   2020-07-09  353  	struct ceph_file_info *fi = ractl->file->private_data;
49870056005ca938 Jeff Layton   2020-07-09  354  	struct ceph_rw_context *rw_ctx;
2b1ac852eb67a6e9 Yan, Zheng    2016-10-25  355  	int got = 0;
2b1ac852eb67a6e9 Yan, Zheng    2016-10-25  356  	int ret = 0;
2b1ac852eb67a6e9 Yan, Zheng    2016-10-25  357  
49870056005ca938 Jeff Layton   2020-07-09  358  	if (ceph_inode(inode)->i_inline_version != CEPH_INLINE_NONE)
49870056005ca938 Jeff Layton   2020-07-09  359  		return;
7c272194e66e9183 Sage Weil     2011-08-03  360  
49870056005ca938 Jeff Layton   2020-07-09  361  	rw_ctx = ceph_find_rw_context(fi);
49870056005ca938 Jeff Layton   2020-07-09  362  	if (!rw_ctx) {
7c272194e66e9183 Sage Weil     2011-08-03  363  		/*
49870056005ca938 Jeff Layton   2020-07-09  364  		 * readahead callers do not necessarily hold Fcb caps
49870056005ca938 Jeff Layton   2020-07-09  365  		 * (e.g. fadvise, madvise).
7c272194e66e9183 Sage Weil     2011-08-03  366  		 */
49870056005ca938 Jeff Layton   2020-07-09  367  		int want = CEPH_CAP_FILE_CACHE;
0d66a487c120012f Sage Weil     2011-08-04  368  
49870056005ca938 Jeff Layton   2020-07-09  369  		ret = ceph_try_get_caps(inode, CEPH_CAP_FILE_RD, want, true, &got);
49870056005ca938 Jeff Layton   2020-07-09  370  		if (ret < 0)
49870056005ca938 Jeff Layton   2020-07-09  371  			dout("start_read %p, error getting cap\n", inode);
49870056005ca938 Jeff Layton   2020-07-09  372  		else if (!(got & want))
49870056005ca938 Jeff Layton   2020-07-09  373  			dout("start_read %p, no cache cap\n", inode);
83701246aee8f83b Yan, Zheng    2014-11-14  374  
49870056005ca938 Jeff Layton   2020-07-09  375  		if (ret <= 0)
49870056005ca938 Jeff Layton   2020-07-09  376  			return;
7c272194e66e9183 Sage Weil     2011-08-03  377  	}
49870056005ca938 Jeff Layton   2020-07-09 @378  	netfs_readahead(ractl, &ceph_netfs_read_ops, (void *)(uintptr_t)got);
1d3576fd10f0d7a1 Sage Weil     2009-10-06  379  }
1d3576fd10f0d7a1 Sage Weil     2009-10-06  380  

:::::: The code at line 310 was first introduced by commit
:::::: f0702876e152f0443911514aec8b2bf563a2432b ceph: convert ceph_readpage to netfs_readpage

:::::: TO: Jeff Layton <jlayton@kernel.org>
:::::: CC: Ilya Dryomov <idryomov@gmail.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65633 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:14 [dhowells-fs:netfs-folio-regions 13/36] fs/ceph/addr.c:310:3: error: 'const struct netfs_request_ops' has no member named 'is_cache_enabled' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).