All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chuck Lever <cel@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v10 4/5] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
Date: Mon, 10 Nov 2025 21:26:00 +0800	[thread overview]
Message-ID: <202511102150.Q7D6LAB6-lkp@intel.com> (raw)
In-Reply-To: <20251105192806.77093-5-cel@kernel.org>

Hi Chuck,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.18-rc5 next-20251110]
[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/Chuck-Lever/NFSD-don-t-start-nfsd-if-sv_permsocks-is-empty/20251106-033348
base:   linus/master
patch link:    https://lore.kernel.org/r/20251105192806.77093-5-cel%40kernel.org
patch subject: [PATCH v10 4/5] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20251110/202511102150.Q7D6LAB6-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/202511102150.Q7D6LAB6-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/202511102150.Q7D6LAB6-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/nfsd/vfs.c: In function 'nfsd_vfs_write':
>> fs/nfsd/vfs.c:1407:14: error: 'NFSD_IO_DIRECT' undeclared (first use in this function)
    1407 |         case NFSD_IO_DIRECT:
         |              ^~~~~~~~~~~~~~
   fs/nfsd/vfs.c:1407: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 +1407 fs/nfsd/vfs.c

  1325	
  1326	/**
  1327	 * nfsd_vfs_write - write data to an already-open file
  1328	 * @rqstp: RPC execution context
  1329	 * @fhp: File handle of file to write into
  1330	 * @nf: An open file matching @fhp
  1331	 * @offset: Byte offset of start
  1332	 * @payload: xdr_buf containing the write payload
  1333	 * @cnt: IN: number of bytes to write, OUT: number of bytes actually written
  1334	 * @stable_how: IN: Client's requested stable_how, OUT: Actual stable_how
  1335	 * @verf: NFS WRITE verifier
  1336	 *
  1337	 * Upon return, caller must invoke fh_put on @fhp.
  1338	 *
  1339	 * Return values:
  1340	 *   An nfsstat value in network byte order.
  1341	 */
  1342	__be32
  1343	nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp,
  1344		       struct nfsd_file *nf, loff_t offset,
  1345		       const struct xdr_buf *payload, unsigned long *cnt,
  1346		       u32 *stable_how, __be32 *verf)
  1347	{
  1348		struct nfsd_net		*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
  1349		struct file		*file = nf->nf_file;
  1350		struct super_block	*sb = file_inode(file)->i_sb;
  1351		u32			stable = *stable_how;
  1352		struct kiocb		kiocb;
  1353		struct svc_export	*exp;
  1354		struct iov_iter		iter;
  1355		errseq_t		since;
  1356		__be32			nfserr;
  1357		int			host_err;
  1358		unsigned long		exp_op_flags = 0;
  1359		unsigned int		pflags = current->flags;
  1360		bool			restore_flags = false;
  1361		unsigned int		nvecs;
  1362	
  1363		trace_nfsd_write_opened(rqstp, fhp, offset, *cnt);
  1364	
  1365		if (sb->s_export_op)
  1366			exp_op_flags = sb->s_export_op->flags;
  1367	
  1368		if (test_bit(RQ_LOCAL, &rqstp->rq_flags) &&
  1369		    !(exp_op_flags & EXPORT_OP_REMOTE_FS)) {
  1370			/*
  1371			 * We want throttling in balance_dirty_pages()
  1372			 * and shrink_inactive_list() to only consider
  1373			 * the backingdev we are writing to, so that nfs to
  1374			 * localhost doesn't cause nfsd to lock up due to all
  1375			 * the client's dirty pages or its congested queue.
  1376			 */
  1377			current->flags |= PF_LOCAL_THROTTLE;
  1378			restore_flags = true;
  1379		}
  1380	
  1381		exp = fhp->fh_export;
  1382	
  1383		if (!EX_ISSYNC(exp))
  1384			stable = NFS_UNSTABLE;
  1385		init_sync_kiocb(&kiocb, file);
  1386		kiocb.ki_pos = offset;
  1387		if (likely(!fhp->fh_use_wgather)) {
  1388			switch (stable) {
  1389			case NFS_FILE_SYNC:
  1390				/* persist data and timestamps */
  1391				kiocb.ki_flags |= IOCB_DSYNC | IOCB_SYNC;
  1392				break;
  1393			case NFS_DATA_SYNC:
  1394				/* persist data only */
  1395				kiocb.ki_flags |= IOCB_DSYNC;
  1396				break;
  1397			}
  1398		}
  1399	
  1400		nvecs = xdr_buf_to_bvec(rqstp->rq_bvec, rqstp->rq_maxpages, payload);
  1401	
  1402		since = READ_ONCE(file->f_wb_err);
  1403		if (verf)
  1404			nfsd_copy_write_verifier(verf, nn);
  1405	
  1406		switch (nfsd_io_cache_write) {
> 1407		case NFSD_IO_DIRECT:
  1408			host_err = nfsd_direct_write(rqstp, fhp, nf, nvecs,
  1409						     cnt, &kiocb);
  1410			break;
  1411		case NFSD_IO_DONTCACHE:
  1412			if (file->f_op->fop_flags & FOP_DONTCACHE)
  1413				kiocb.ki_flags |= IOCB_DONTCACHE;
  1414			fallthrough;
  1415		case NFSD_IO_BUFFERED:
  1416			iov_iter_bvec(&iter, ITER_SOURCE, rqstp->rq_bvec, nvecs, *cnt);
  1417			host_err = vfs_iocb_iter_write(file, &kiocb, &iter);
  1418			if (host_err < 0)
  1419				break;
  1420			*cnt = host_err;
  1421			break;
  1422		}
  1423		if (host_err < 0) {
  1424			commit_reset_write_verifier(nn, rqstp, host_err);
  1425			goto out_nfserr;
  1426		}
  1427		nfsd_stats_io_write_add(nn, exp, *cnt);
  1428		fsnotify_modify(file);
  1429		host_err = filemap_check_wb_err(file->f_mapping, since);
  1430		if (host_err < 0)
  1431			goto out_nfserr;
  1432	
  1433		if (stable && fhp->fh_use_wgather) {
  1434			host_err = wait_for_concurrent_writes(file);
  1435			if (host_err < 0)
  1436				commit_reset_write_verifier(nn, rqstp, host_err);
  1437		}
  1438	
  1439	out_nfserr:
  1440		if (host_err >= 0) {
  1441			trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt);
  1442			nfserr = nfs_ok;
  1443		} else {
  1444			trace_nfsd_write_err(rqstp, fhp, offset, host_err);
  1445			nfserr = nfserrno(host_err);
  1446		}
  1447		if (restore_flags)
  1448			current_restore_flags(pflags, PF_LOCAL_THROTTLE);
  1449		return nfserr;
  1450	}
  1451	

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

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

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 19:28 [PATCH v10 0/5] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-11-05 19:28 ` [PATCH v10 1/5] NFSD: don't start nfsd if sv_permsocks is empty Chuck Lever
2025-11-05 19:31   ` Chuck Lever
2025-11-05 19:28 ` [PATCH v10 2/5] NFSD: Make FILE_SYNC WRITEs comply with spec Chuck Lever
2025-11-06  0:55   ` NeilBrown
2025-11-06 13:05   ` Christoph Hellwig
2025-11-05 19:28 ` [PATCH v10 3/5] NFSD: Enable return of an updated stable_how to NFS clients Chuck Lever
2025-11-06 13:07   ` Christoph Hellwig
2025-11-06 16:30     ` Chuck Lever
2025-11-05 19:28 ` [PATCH v10 4/5] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-11-06 10:11   ` NeilBrown
2025-11-06 13:15     ` Christoph Hellwig
2025-11-06 13:51       ` Christoph Hellwig
2025-11-06 14:45         ` Chuck Lever
2025-11-06 14:49           ` Christoph Hellwig
2025-11-06 16:48         ` Mike Snitzer
2025-11-06 18:10           ` Chuck Lever
2025-11-06 19:02             ` Mike Snitzer
2025-11-07 13:24               ` Christoph Hellwig
2025-11-07 14:38                 ` Chuck Lever
2025-11-07 15:24                   ` Christoph Hellwig
2025-11-07 15:26                     ` Chuck Lever
2025-11-10 13:26   ` kernel test robot [this message]
2025-11-10 19:00   ` kernel test robot
2025-11-05 19:28 ` [PATCH v10 5/5] NFSD: add Documentation/filesystems/nfs/nfsd-io-modes.rst Chuck Lever
2025-11-06 10:24   ` NeilBrown
2025-11-06 15:46     ` Mike Snitzer
2025-11-06 15:52       ` Chuck Lever

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=202511102150.Q7D6LAB6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cel@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.