* [djwong-xfs:realtime-rmap 174/202] fs/xfs/xfs_extfree_item.c:377:16: warning: variable 'rt_len' set but not used
@ 2020-11-30 13:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-30 13:28 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3861 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git realtime-rmap
head: 8f3f8360bb6fe95f3ecd3b1024f21eb094c72a53
commit: ddba8c1aacc55b7d88537b18b369021263cd4a9f [174/202] xfs: support logging EFIs for realtime extents
config: c6x-randconfig-r036-20201130 (attached as .config)
compiler: c6x-elf-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
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=ddba8c1aacc55b7d88537b18b369021263cd4a9f
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs realtime-rmap
git checkout ddba8c1aacc55b7d88537b18b369021263cd4a9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
fs/xfs/xfs_extfree_item.c: In function 'xfs_trans_free_extent':
>> fs/xfs/xfs_extfree_item.c:377:16: warning: variable 'rt_len' set but not used [-Wunused-but-set-variable]
377 | xfs_extlen_t rt_len;
| ^~~~~~
>> fs/xfs/xfs_extfree_item.c:376:17: warning: variable 'rt_ext' set but not used [-Wunused-but-set-variable]
376 | xfs_rtblock_t rt_ext;
| ^~~~~~
vim +/rt_len +377 fs/xfs/xfs_extfree_item.c
349
350 /*
351 * Free an extent and log it to the EFD. Note that the transaction is marked
352 * dirty regardless of whether the extent free succeeds or fails to support the
353 * EFI/EFD lifecycle rules.
354 */
355 static int
356 xfs_trans_free_extent(
357 struct xfs_trans *tp,
358 struct xfs_efd_log_item *efdp,
359 xfs_fsblock_t start_block,
360 xfs_extlen_t ext_len,
361 bool realtime,
362 const struct xfs_owner_info *oinfo,
363 bool skip_discard)
364 {
365 struct xfs_mount *mp = tp->t_mountp;
366 struct xfs_extent *extp;
367 uint next_extent;
368 xfs_agnumber_t agno = XFS_FSB_TO_AGNO(mp, start_block);
369 xfs_agblock_t agbno = XFS_FSB_TO_AGBNO(mp,
370 start_block);
371 int error;
372
373 trace_xfs_bmap_free_deferred(tp->t_mountp, agno, 0, agbno, ext_len);
374
375 if (realtime) {
> 376 xfs_rtblock_t rt_ext;
> 377 xfs_extlen_t rt_len;
378 xfs_extlen_t mod;
379
380 rt_len = ext_len / mp->m_sb.sb_rextsize;
381
382 rt_ext = div_u64_rem(start_block, mp->m_sb.sb_rextsize, &mod);
383 ASSERT(mod == 0);
384
385 error = xfs_rtfree_extent(tp, rt_ext, rt_len);
386 } else
387 error = __xfs_free_extent(tp, start_block, ext_len, oinfo,
388 XFS_AG_RESV_NONE, skip_discard);
389 /*
390 * Mark the transaction dirty, even on error. This ensures the
391 * transaction is aborted, which:
392 *
393 * 1.) releases the EFI and frees the EFD
394 * 2.) shuts down the filesystem
395 */
396 tp->t_flags |= XFS_TRANS_DIRTY;
397 set_bit(XFS_LI_DIRTY, &efdp->efd_item.li_flags);
398
399 next_extent = efdp->efd_next_extent;
400 ASSERT(next_extent < efdp->efd_format.efd_nextents);
401 extp = &(efdp->efd_format.efd_extents[next_extent]);
402 extp->ext_start = start_block;
403 extp->ext_len = ext_len;
404 efdp->efd_next_extent++;
405
406 return error;
407 }
408
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 21847 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-30 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30 13:28 [djwong-xfs:realtime-rmap 174/202] fs/xfs/xfs_extfree_item.c:377:16: warning: variable 'rt_len' set but not used 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.