From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>,
Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, Neil Brown <neilb@suse.de>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/3] nfsd: call svc_fill_write_vector from nfsd_vfs_write
Date: Fri, 9 May 2025 07:08:45 +0800 [thread overview]
Message-ID: <202505090631.R8lqfckA-lkp@intel.com> (raw)
In-Reply-To: <20250507115617.3995150-2-hch@lst.de>
Hi Christoph,
kernel test robot noticed the following build warnings:
[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on trondmy-nfs/linux-next linus/master v6.15-rc5]
[cannot apply to next-20250508]
[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/Christoph-Hellwig/nfsd-use-rq_bvec-instead-of-rq_vec-in-nfsd_vfs_write/20250507-205615
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20250507115617.3995150-2-hch%40lst.de
patch subject: [PATCH 1/3] nfsd: call svc_fill_write_vector from nfsd_vfs_write
config: x86_64-randconfig-121-20250508 (https://download.01.org/0day-ci/archive/20250509/202505090631.R8lqfckA-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505090631.R8lqfckA-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/202505090631.R8lqfckA-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/nfsd/vfs.c:1167:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __be32 @@ got int @@
fs/nfsd/vfs.c:1167:24: sparse: expected restricted __be32
fs/nfsd/vfs.c:1167:24: sparse: got int
vim +1167 fs/nfsd/vfs.c
1142
1143 __be32
1144 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
1145 loff_t offset, struct xdr_buf *payload, unsigned long *cnt,
1146 int stable, __be32 *verf)
1147 {
1148 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
1149 struct file *file = nf->nf_file;
1150 struct super_block *sb = file_inode(file)->i_sb;
1151 struct svc_export *exp;
1152 struct iov_iter iter;
1153 errseq_t since;
1154 __be32 nfserr;
1155 int host_err;
1156 loff_t pos = offset;
1157 unsigned long exp_op_flags = 0;
1158 unsigned int pflags = current->flags;
1159 rwf_t flags = 0;
1160 bool restore_flags = false;
1161 unsigned int nvecs;
1162
1163 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt);
1164
1165 nvecs = svc_fill_write_vector(rqstp, payload);
1166 if (WARN_ON_ONCE(nvecs > ARRAY_SIZE(rqstp->rq_vec)))
> 1167 return -EIO;
1168
1169 if (sb->s_export_op)
1170 exp_op_flags = sb->s_export_op->flags;
1171
1172 if (test_bit(RQ_LOCAL, &rqstp->rq_flags) &&
1173 !(exp_op_flags & EXPORT_OP_REMOTE_FS)) {
1174 /*
1175 * We want throttling in balance_dirty_pages()
1176 * and shrink_inactive_list() to only consider
1177 * the backingdev we are writing to, so that nfs to
1178 * localhost doesn't cause nfsd to lock up due to all
1179 * the client's dirty pages or its congested queue.
1180 */
1181 current->flags |= PF_LOCAL_THROTTLE;
1182 restore_flags = true;
1183 }
1184
1185 exp = fhp->fh_export;
1186
1187 if (!EX_ISSYNC(exp))
1188 stable = NFS_UNSTABLE;
1189
1190 if (stable && !fhp->fh_use_wgather)
1191 flags |= RWF_SYNC;
1192
1193 iov_iter_kvec(&iter, ITER_SOURCE, rqstp->rq_vec, nvecs, *cnt);
1194 since = READ_ONCE(file->f_wb_err);
1195 if (verf)
1196 nfsd_copy_write_verifier(verf, nn);
1197 host_err = vfs_iter_write(file, &iter, &pos, flags);
1198 if (host_err < 0) {
1199 commit_reset_write_verifier(nn, rqstp, host_err);
1200 goto out_nfserr;
1201 }
1202 *cnt = host_err;
1203 nfsd_stats_io_write_add(nn, exp, *cnt);
1204 fsnotify_modify(file);
1205 host_err = filemap_check_wb_err(file->f_mapping, since);
1206 if (host_err < 0)
1207 goto out_nfserr;
1208
1209 if (stable && fhp->fh_use_wgather) {
1210 host_err = wait_for_concurrent_writes(file);
1211 if (host_err < 0)
1212 commit_reset_write_verifier(nn, rqstp, host_err);
1213 }
1214
1215 out_nfserr:
1216 if (host_err >= 0) {
1217 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt);
1218 nfserr = nfs_ok;
1219 } else {
1220 trace_nfsd_write_err(rqstp, fhp, offset, host_err);
1221 nfserr = nfserrno(host_err);
1222 }
1223 if (restore_flags)
1224 current_restore_flags(pflags, PF_LOCAL_THROTTLE);
1225 return nfserr;
1226 }
1227
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-08 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 11:55 remove rq_vec Christoph Hellwig
2025-05-07 11:55 ` [PATCH 1/3] nfsd: call svc_fill_write_vector from nfsd_vfs_write Christoph Hellwig
2025-05-08 23:08 ` kernel test robot [this message]
2025-05-07 11:55 ` [PATCH 2/3] nfsd: use rq_bvec instead of rq_vec in nfsd_vfs_write Christoph Hellwig
2025-05-08 15:42 ` kernel test robot
2025-05-07 11:55 ` [PATCH 3/3] nfsd: use rq_bvec in nfsd_iter_read Christoph Hellwig
2025-05-07 13:58 ` remove rq_vec 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=202505090631.R8lqfckA-lkp@intel.com \
--to=lkp@intel.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox