* [djwong-xfs:llm-fixes-22 118/129] fs/xfs/scrub/quota_repair.c:320:3: error: a label can only be part of a statement and a declaration is not a statement
@ 2026-07-09 5:23 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-09 5:23 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git llm-fixes-22
head: ced08f72306d1ae24c172dbb6a2dbff99aec3be4
commit: 06adca9a2b052cd5c47fb0a7ad3df7d274028800 [118/129] xfs: reinitialize dquot block if non-first dquot can't load
config: alpha-randconfig-r134-20260708 (https://download.01.org/0day-ci/archive/20260709/202607091345.ut4Vf8e5-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/202607091345.ut4Vf8e5-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/202607091345.ut4Vf8e5-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/xfs/scrub/quota_repair.c: In function 'xrep_quota_block':
>> fs/xfs/scrub/quota_repair.c:320:3: error: a label can only be part of a statement and a declaration is not a statement
int bad = 0;
^~~
vim +320 fs/xfs/scrub/quota_repair.c
290
291 /* Fix anything the verifiers complain about. */
292 STATIC int
293 xrep_quota_block(
294 struct xfs_scrub *sc,
295 xfs_daddr_t daddr,
296 xfs_dqtype_t dqtype,
297 xfs_dqid_t id)
298 {
299 struct xfs_dqblk *dqblk;
300 struct xfs_quotainfo *qi = sc->mp->m_quotainfo;
301 struct xfs_def_quota *defq = xfs_get_defquota(qi, dqtype);
302 struct xfs_buf *bp = NULL;
303 enum xfs_blft buftype = 0;
304 int i;
305 int error;
306
307 error = xfs_trans_read_buf(sc->mp, sc->tp, sc->mp->m_ddev_targp, daddr,
308 qi->qi_dqchunklen, 0, &bp, &xfs_dquot_buf_ops);
309 switch (error) {
310 case -EFSBADCRC:
311 case -EFSCORRUPTED:
312 /* Failed verifier, retry read with no ops. */
313 error = xfs_trans_read_buf(sc->mp, sc->tp,
314 sc->mp->m_ddev_targp, daddr, qi->qi_dqchunklen,
315 0, &bp, NULL);
316 if (error)
317 return error;
318 break;
319 case 0:
> 320 int bad = 0;
321
322 dqblk = bp->b_addr;
323
324 /*
325 * If there's nothing that would impede a dqiterate, we're
326 * done.
327 */
328 for (i = 0; i < qi->qi_dqperchunk; i++, dqblk++) {
329 struct xfs_disk_dquot *ddq = &dqblk->dd_diskdq;
330
331 if ((ddq->d_type & XFS_DQTYPE_REC_MASK) != dqtype ||
332 id + i != be32_to_cpu(ddq->d_id))
333 bad++;
334 }
335
336 if (!bad) {
337 xfs_trans_brelse(sc->tp, bp);
338 return 0;
339 }
340 break;
341 default:
342 return error;
343 }
344
345 /* Something's wrong with the block, fix the whole thing. */
346 dqblk = bp->b_addr;
347 bp->b_ops = &xfs_dquot_buf_ops;
348 for (i = 0; i < qi->qi_dqperchunk; i++, dqblk++) {
349 struct xfs_disk_dquot *ddq = &dqblk->dd_diskdq;
350
351 trace_xrep_disk_dquot(sc->mp, dqtype, id + i);
352
353 ddq->d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
354 ddq->d_version = XFS_DQUOT_VERSION;
355 ddq->d_type = dqtype;
356 ddq->d_id = cpu_to_be32(id + i);
357
358 if (xfs_has_bigtime(sc->mp) && ddq->d_id)
359 ddq->d_type |= XFS_DQTYPE_BIGTIME;
360
361 xrep_quota_fix_timer(sc->mp, ddq, ddq->d_blk_softlimit,
362 ddq->d_bcount, &ddq->d_btimer,
363 defq->blk.time);
364
365 xrep_quota_fix_timer(sc->mp, ddq, ddq->d_ino_softlimit,
366 ddq->d_icount, &ddq->d_itimer,
367 defq->ino.time);
368
369 xrep_quota_fix_timer(sc->mp, ddq, ddq->d_rtb_softlimit,
370 ddq->d_rtbcount, &ddq->d_rtbtimer,
371 defq->rtb.time);
372
373 /* We only support v5 filesystems so always set these. */
374 dqblk->dd_lsn = 0;
375 uuid_copy(&dqblk->dd_uuid, &sc->mp->m_sb.sb_meta_uuid);
376 xfs_update_cksum((char *)dqblk, sizeof(struct xfs_dqblk),
377 XFS_DQUOT_CRC_OFF);
378 }
379 switch (dqtype) {
380 case XFS_DQTYPE_USER:
381 buftype = XFS_BLFT_UDQUOT_BUF;
382 break;
383 case XFS_DQTYPE_GROUP:
384 buftype = XFS_BLFT_GDQUOT_BUF;
385 break;
386 case XFS_DQTYPE_PROJ:
387 buftype = XFS_BLFT_PDQUOT_BUF;
388 break;
389 }
390 xfs_trans_buf_set_type(sc->tp, bp, buftype);
391 xfs_trans_log_buf(sc->tp, bp, 0, BBTOB(bp->b_length) - 1);
392 return xrep_roll_trans(sc);
393 }
394
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-09 5:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 5:23 [djwong-xfs:llm-fixes-22 118/129] fs/xfs/scrub/quota_repair.c:320:3: error: a label can only be part of a statement and a declaration is not a statement kernel test robot
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.