All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mike Snitzer <snitzer@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [snitzer:nfs-localio-for-next-6.11-rc3 26/26] fs/nfs/flexfilelayout/flexfilelayout.c:202:21: error: assignment to 'struct nfsd_file *' from incompatible pointer type 'struct file *'
Date: Sat, 17 Aug 2024 23:02:31 +0800	[thread overview]
Message-ID: <202408172327.2okeBsqw-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git nfs-localio-for-next-6.11-rc3
head:   d185b803ff9694a70f39b5e1cf3ea404782ef6dd
commit: d185b803ff9694a70f39b5e1cf3ea404782ef6dd [26/26] nfs: switch client to use nfsd_file for localio
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240817/202408172327.2okeBsqw-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240817/202408172327.2okeBsqw-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408172327.2okeBsqw-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_local_open_fh':
>> fs/nfs/flexfilelayout/flexfilelayout.c:202:21: error: assignment to 'struct nfsd_file *' from incompatible pointer type 'struct file *' [-Wincompatible-pointer-types]
     202 |                 new = nfs_local_open_fh(clp, cred, fh, mode);
         |                     ^
>> fs/nfs/flexfilelayout/flexfilelayout.c:213:17: error: 'struct nfs_client' has no member named 'nfsd_file_get'
     213 |         nf = clp->nfsd_file_get(nf);
         |                 ^~
>> fs/nfs/flexfilelayout/flexfilelayout.c:216:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
     216 |                 clp->nfsd_file_put(new);
         |                    ^~
   fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_free_mirror':
   fs/nfs/flexfilelayout/flexfilelayout.c:301:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
     301 |                 clp->nfsd_file_put(nf);
         |                    ^~
   fs/nfs/flexfilelayout/flexfilelayout.c:304:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
     304 |                 clp->nfsd_file_put(nf);
         |                    ^~
   fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_alloc_lseg':
   fs/nfs/flexfilelayout/flexfilelayout.c:590:78: error: 'struct nfs_client' has no member named 'nfsd_file_put'
     590 |                                                 mirror->mirror_ds->ds->ds_clp->nfsd_file_put(nf);
         |                                                                              ^~
   fs/nfs/flexfilelayout/flexfilelayout.c:598:78: error: 'struct nfs_client' has no member named 'nfsd_file_put'
     598 |                                                 mirror->mirror_ds->ds->ds_clp->nfsd_file_put(nf);
         |                                                                              ^~
   fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_io_track_ds_error':
   fs/nfs/flexfilelayout/flexfilelayout.c:1299:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
    1299 |         int err;
         |             ^~~


vim +202 fs/nfs/flexfilelayout/flexfilelayout.c

d185b803ff9694 Mike Snitzer    2024-08-14  173  
d185b803ff9694 Mike Snitzer    2024-08-14  174  static struct nfsd_file *
341000a1f1d534 Trond Myklebust 2019-11-03  175  ff_local_open_fh(struct pnfs_layout_segment *lseg,
341000a1f1d534 Trond Myklebust 2019-11-03  176  		 u32 ds_idx,
341000a1f1d534 Trond Myklebust 2019-11-03  177  		 struct nfs_client *clp,
341000a1f1d534 Trond Myklebust 2019-11-03  178  		 const struct cred *cred,
341000a1f1d534 Trond Myklebust 2019-11-03  179  		 struct nfs_fh *fh,
341000a1f1d534 Trond Myklebust 2019-11-03  180  		 fmode_t mode)
341000a1f1d534 Trond Myklebust 2019-11-03  181  {
341000a1f1d534 Trond Myklebust 2019-11-03  182  	struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
d185b803ff9694 Mike Snitzer    2024-08-14  183  	struct nfsd_file *nf, *new, __rcu **pnf;
341000a1f1d534 Trond Myklebust 2019-11-03  184  
341000a1f1d534 Trond Myklebust 2019-11-03  185  	if (!nfs_server_is_local(clp))
341000a1f1d534 Trond Myklebust 2019-11-03  186  		return NULL;
341000a1f1d534 Trond Myklebust 2019-11-03  187  	if (mode & FMODE_WRITE) {
341000a1f1d534 Trond Myklebust 2019-11-03  188  		/*
341000a1f1d534 Trond Myklebust 2019-11-03  189  		 * Always request read and write access since this corresponds
341000a1f1d534 Trond Myklebust 2019-11-03  190  		 * to a rw layout.
341000a1f1d534 Trond Myklebust 2019-11-03  191  		 */
341000a1f1d534 Trond Myklebust 2019-11-03  192  		mode |= FMODE_READ;
d185b803ff9694 Mike Snitzer    2024-08-14  193  		pnf = &mirror->rw_file;
341000a1f1d534 Trond Myklebust 2019-11-03  194  	} else
d185b803ff9694 Mike Snitzer    2024-08-14  195  		pnf = &mirror->ro_file;
341000a1f1d534 Trond Myklebust 2019-11-03  196  
341000a1f1d534 Trond Myklebust 2019-11-03  197  	new = NULL;
341000a1f1d534 Trond Myklebust 2019-11-03  198  	rcu_read_lock();
d185b803ff9694 Mike Snitzer    2024-08-14  199  	nf = rcu_dereference(*pnf);
d185b803ff9694 Mike Snitzer    2024-08-14  200  	if (!nf) {
341000a1f1d534 Trond Myklebust 2019-11-03  201  		rcu_read_unlock();
341000a1f1d534 Trond Myklebust 2019-11-03 @202  		new = nfs_local_open_fh(clp, cred, fh, mode);
341000a1f1d534 Trond Myklebust 2019-11-03  203  		if (IS_ERR(new))
341000a1f1d534 Trond Myklebust 2019-11-03  204  			return NULL;
341000a1f1d534 Trond Myklebust 2019-11-03  205  		rcu_read_lock();
341000a1f1d534 Trond Myklebust 2019-11-03  206  		/* try to swap in the pointer */
d185b803ff9694 Mike Snitzer    2024-08-14  207  		nf = cmpxchg(pnf, NULL, new);
d185b803ff9694 Mike Snitzer    2024-08-14  208  		if (!nf) {
d185b803ff9694 Mike Snitzer    2024-08-14  209  			nf = new;
341000a1f1d534 Trond Myklebust 2019-11-03  210  			new = NULL;
341000a1f1d534 Trond Myklebust 2019-11-03  211  		}
341000a1f1d534 Trond Myklebust 2019-11-03  212  	}
d185b803ff9694 Mike Snitzer    2024-08-14 @213  	nf = clp->nfsd_file_get(nf);
341000a1f1d534 Trond Myklebust 2019-11-03  214  	rcu_read_unlock();
341000a1f1d534 Trond Myklebust 2019-11-03  215  	if (new)
d185b803ff9694 Mike Snitzer    2024-08-14 @216  		clp->nfsd_file_put(new);
d185b803ff9694 Mike Snitzer    2024-08-14  217  	return nf;
341000a1f1d534 Trond Myklebust 2019-11-03  218  }
341000a1f1d534 Trond Myklebust 2019-11-03  219  

:::::: The code at line 202 was first introduced by commit
:::::: 341000a1f1d534755829800b27ffd46890e4fa9e pnfs/flexfiles: enable localio support

:::::: TO: Trond Myklebust <trond.myklebust@hammerspace.com>
:::::: CC: Mike Snitzer <snitzer@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-08-17 15:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408172327.2okeBsqw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.