tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-quota
head: 46c1bb2989f596b35ff8fd23fc42a15d36b27e96
commit: 7d1edf310e9cb46eccfc844765af018a43088cb0 [54/55] xfs: track quota updates during
live quotacheck
config: nds32-randconfig-r006-20200622 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7d1edf310e9cb46eccfc844765af018a43088cb0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
fs/xfs/scrub/quotacheck.c: In function 'xqcheck_mod_dquot':
> fs/xfs/scrub/quotacheck.c:303:13: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
303 | dqa->tp = (unsigned
long long)p->tp;
| ^
vim +303 fs/xfs/scrub/quotacheck.c
259
260 /*
261 * Create and fill out a quota delta tracking structure to shadow the updates
262 * going on in the regular quota code.
263 */
264 static int
265 xqcheck_mod_dquot(
266 struct notifier_block *nb,
267 unsigned long arg,
268 void *data)
269 {
270 struct xfs_trans_mod_dquot_params *p = data;
271 struct xqcheck *xqc;
272 struct xqcheck_dqacct *dqa;
273 struct xqcheck_dqtrx *dqtrx;
274 int error;
275
276 xqc = container_of(nb, struct xqcheck, mod_hook);
277
278 /* Skip quota reservation fields. */
279 switch (p->field) {
280 case XFS_TRANS_DQ_BCOUNT:
281 case XFS_TRANS_DQ_DELBCOUNT:
282 case XFS_TRANS_DQ_ICOUNT:
283 case XFS_TRANS_DQ_RTBCOUNT:
284 case XFS_TRANS_DQ_DELRTBCOUNT:
285 break;
286 default:
287 return NOTIFY_DONE;
288 }
289
290 /* Skip inodes that haven't been scanned yet. */
291 mutex_lock(&xqc->lock);
292 if (xqc->last_ino < p->ip->i_ino || xqc->hook_dead)
293 goto out_unlock;
294
295 /* Make a shadow quota accounting tracker for this transaction. */
296 dqa = rhashtable_lookup_fast(&xqc->shadow_dquot_acct, &p->tp,
297 xqcheck_dqacct_hash_params);
298 if (!dqa) {
299 dqa = kmem_zalloc(sizeof(*dqa), KM_MAYFAIL | KM_NOFS);
300 if (!dqa)
301 goto fail;
302
303 dqa->tp = (unsigned long long)p->tp;
304 error
= rhashtable_insert_fast(&xqc->shadow_dquot_acct,
305 &dqa->hash, xqcheck_dqacct_hash_params);
306 if (error)
307 goto fail;
308 }
309
310 /* Find the shadow dqtrx (or an empty slot) here. */
311 dqtrx = xqcheck_get_dqtrx(dqa, p->dqp);
312 if (!dqtrx)
313 goto fail;
314 if (dqtrx->dqp == NULL) {
315 dqtrx->dqp = p->dqp;
316 dqa->refcount++;
317 }
318
319 /* Update counter */
320 switch (p->field) {
321 case XFS_TRANS_DQ_BCOUNT:
322 dqtrx->bcount_delta += p->delta;
323 break;
324 case XFS_TRANS_DQ_DELBCOUNT:
325 dqtrx->delbcnt_delta += p->delta;
326 break;
327 case XFS_TRANS_DQ_ICOUNT:
328 dqtrx->icount_delta += p->delta;
329 break;
330 case XFS_TRANS_DQ_RTBCOUNT:
331 dqtrx->rtbcount_delta += p->delta;
332 break;
333 case XFS_TRANS_DQ_DELRTBCOUNT:
334 dqtrx->delrtb_delta += p->delta;
335 break;
336 }
337
338 goto out_unlock;
339 fail:
340 xqc->hook_dead = true;
341 out_unlock:
342 mutex_unlock(&xqc->lock);
343 return NOTIFY_DONE;
344 }
345
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org