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: Re: [PATCH v2] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
Date: Sat, 11 Oct 2025 19:57:06 +0800	[thread overview]
Message-ID: <202510111943.j0LGa569-lkp@intel.com> (raw)
In-Reply-To: <aOa0ijW1h-1tynWD@kernel.org>

Hi Mike,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20251009]
[also build test ERROR on linus/master]
[cannot apply to brauner-vfs/vfs.all v6.17 v6.17-rc7 v6.17-rc6 v6.17]
[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/Mike-Snitzer/NFSD-Implement-NFSD_IO_DIRECT-for-NFS-WRITE/20251010-133404
base:   next-20251009
patch link:    https://lore.kernel.org/r/aOa0ijW1h-1tynWD%40kernel.org
patch subject: [PATCH v2] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
config: sparc-randconfig-002-20251011 (https://download.01.org/0day-ci/archive/20251011/202510111943.j0LGa569-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251011/202510111943.j0LGa569-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/202510111943.j0LGa569-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/nfsd/vfs.c: In function 'nfsd_vfs_write':
>> fs/nfsd/vfs.c:1437:14: error: 'NFSD_IO_DIRECT' undeclared (first use in this function)
    1437 |         case NFSD_IO_DIRECT:
         |              ^~~~~~~~~~~~~~
   fs/nfsd/vfs.c:1437:14: note: each undeclared identifier is reported only once for each function it appears in
--
   fs/nfsd/debugfs.c: In function 'nfsd_io_cache_write_set':
>> fs/nfsd/debugfs.c:109:14: error: 'NFSD_IO_DIRECT' undeclared (first use in this function)
     109 |         case NFSD_IO_DIRECT:
         |              ^~~~~~~~~~~~~~
   fs/nfsd/debugfs.c:109:14: note: each undeclared identifier is reported only once for each function it appears in


vim +/NFSD_IO_DIRECT +1437 fs/nfsd/vfs.c

  1367	
  1368	/**
  1369	 * nfsd_vfs_write - write data to an already-open file
  1370	 * @rqstp: RPC execution context
  1371	 * @fhp: File handle of file to write into
  1372	 * @nf: An open file matching @fhp
  1373	 * @offset: Byte offset of start
  1374	 * @payload: xdr_buf containing the write payload
  1375	 * @cnt: IN: number of bytes to write, OUT: number of bytes actually written
  1376	 * @stable: An NFS stable_how value
  1377	 * @verf: NFS WRITE verifier
  1378	 *
  1379	 * Upon return, caller must invoke fh_put on @fhp.
  1380	 *
  1381	 * Return values:
  1382	 *   An nfsstat value in network byte order.
  1383	 */
  1384	__be32
  1385	nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp,
  1386		       struct nfsd_file *nf, loff_t offset,
  1387		       const struct xdr_buf *payload, unsigned long *cnt,
  1388		       int stable, __be32 *verf)
  1389	{
  1390		struct nfsd_net		*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
  1391		struct file		*file = nf->nf_file;
  1392		struct super_block	*sb = file_inode(file)->i_sb;
  1393		struct kiocb		kiocb;
  1394		struct svc_export	*exp;
  1395		errseq_t		since;
  1396		__be32			nfserr;
  1397		int			host_err;
  1398		unsigned long		exp_op_flags = 0;
  1399		unsigned int		pflags = current->flags;
  1400		bool			restore_flags = false;
  1401		unsigned int		nvecs;
  1402	
  1403		trace_nfsd_write_opened(rqstp, fhp, offset, *cnt);
  1404	
  1405		if (sb->s_export_op)
  1406			exp_op_flags = sb->s_export_op->flags;
  1407	
  1408		if (test_bit(RQ_LOCAL, &rqstp->rq_flags) &&
  1409		    !(exp_op_flags & EXPORT_OP_REMOTE_FS)) {
  1410			/*
  1411			 * We want throttling in balance_dirty_pages()
  1412			 * and shrink_inactive_list() to only consider
  1413			 * the backingdev we are writing to, so that nfs to
  1414			 * localhost doesn't cause nfsd to lock up due to all
  1415			 * the client's dirty pages or its congested queue.
  1416			 */
  1417			current->flags |= PF_LOCAL_THROTTLE;
  1418			restore_flags = true;
  1419		}
  1420	
  1421		exp = fhp->fh_export;
  1422	
  1423		if (!EX_ISSYNC(exp))
  1424			stable = NFS_UNSTABLE;
  1425		init_sync_kiocb(&kiocb, file);
  1426		kiocb.ki_pos = offset;
  1427		if (stable && !fhp->fh_use_wgather)
  1428			kiocb.ki_flags |= IOCB_DSYNC;
  1429	
  1430		nvecs = xdr_buf_to_bvec(rqstp->rq_bvec, rqstp->rq_maxpages, payload);
  1431	
  1432		since = READ_ONCE(file->f_wb_err);
  1433		if (verf)
  1434			nfsd_copy_write_verifier(verf, nn);
  1435	
  1436		switch (nfsd_io_cache_write) {
> 1437		case NFSD_IO_DIRECT:
  1438			host_err = nfsd_direct_write(rqstp, fhp, nf, offset,
  1439						     nvecs, cnt, &kiocb);
  1440			break;
  1441		case NFSD_IO_DONTCACHE:
  1442			if (file->f_op->fop_flags & FOP_DONTCACHE)
  1443				kiocb.ki_flags |= IOCB_DONTCACHE;
  1444			fallthrough; /* must call nfsd_buffered_write */
  1445		case NFSD_IO_BUFFERED:
  1446			host_err = nfsd_buffered_write(rqstp, file,
  1447						       nvecs, cnt, &kiocb);
  1448			break;
  1449		}
  1450		if (host_err < 0) {
  1451			commit_reset_write_verifier(nn, rqstp, host_err);
  1452			goto out_nfserr;
  1453		}
  1454		nfsd_stats_io_write_add(nn, exp, *cnt);
  1455		fsnotify_modify(file);
  1456		host_err = filemap_check_wb_err(file->f_mapping, since);
  1457		if (host_err < 0)
  1458			goto out_nfserr;
  1459	
  1460		if (stable && fhp->fh_use_wgather) {
  1461			host_err = wait_for_concurrent_writes(file);
  1462			if (host_err < 0)
  1463				commit_reset_write_verifier(nn, rqstp, host_err);
  1464		}
  1465	
  1466	out_nfserr:
  1467		if (host_err >= 0) {
  1468			trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt);
  1469			nfserr = nfs_ok;
  1470		} else {
  1471			trace_nfsd_write_err(rqstp, fhp, offset, host_err);
  1472			nfserr = nfserrno(host_err);
  1473		}
  1474		if (restore_flags)
  1475			current_restore_flags(pflags, PF_LOCAL_THROTTLE);
  1476		return nfserr;
  1477	}
  1478	

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

      parent reply	other threads:[~2025-10-11 11:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 19:05 [PATCH v1 0/3] NFSD direct I/O read Chuck Lever
2025-09-09 19:05 ` [PATCH v1 1/3] NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support Chuck Lever
2025-09-09 23:07   ` NeilBrown
2025-09-09 19:05 ` [PATCH v1 2/3] NFSD: pass nfsd_file to nfsd_iter_read() Chuck Lever
2025-09-09 23:20   ` NeilBrown
2025-09-09 19:05 ` [PATCH v1 3/3] NFSD: Implement NFSD_IO_DIRECT for NFS READ Chuck Lever
2025-09-09 23:16   ` Mike Snitzer
2025-09-09 23:37   ` NeilBrown
2025-09-09 23:39     ` Chuck Lever
2025-09-09 23:48       ` Chuck Lever
2025-09-10  1:54         ` NeilBrown
2025-09-10  1:52       ` NeilBrown
2025-09-10 14:23         ` Chuck Lever
2025-09-09 23:56     ` Mike Snitzer
2025-09-10 11:37   ` Jeff Layton
2025-09-09 23:33 ` [PATCH 0/2] NFSD: continuation of NFSD DIRECT Mike Snitzer
2025-09-09 23:33   ` [PATCH 1/2] sunrpc: add an extra reserve page to svc_serv_maxpages() Mike Snitzer
2025-09-10 14:29     ` Chuck Lever
2025-09-09 23:33   ` [PATCH 2/2] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Mike Snitzer
2025-10-08 18:59     ` [PATCH v2] " Mike Snitzer
2025-10-09 15:04       ` Jeff Layton
2025-10-09 17:46       ` Chuck Lever
2025-10-13 15:41         ` Mike Snitzer
2025-10-11 11:57       ` kernel test robot [this message]

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=202510111943.j0LGa569-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.