[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108171220.1gigWaA4-lkp@intel.com>
Date: Tue, 17 Aug 2021 12:05:27 +0800
From: kernel test robot <lkp@...el.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: kbuild-all@...ts.01.org,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-kernel@...r.kernel.org
Subject: [djwong-xfs:defrag-freespace 309/310]
fs/xfs/libxfs/xfs_bmap.c:6593:33: warning: variable 'rtxlen_in' set but not
used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git defrag-freespace
head: eac62500d5481c286ef5fac0873d1707175312b6
commit: e17e75a18c97e1f807f4e82707349ffa38c94fa3 [309/310] xfs: fallocate free space into a file
config: mips-rm200_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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=e17e75a18c97e1f807f4e82707349ffa38c94fa3
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs defrag-freespace
git checkout e17e75a18c97e1f807f4e82707349ffa38c94fa3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
fs/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmapi_freesp':
>> fs/xfs/libxfs/xfs_bmap.c:6593:33: warning: variable 'rtxlen_in' set but not used [-Wunused-but-set-variable]
6593 | xfs_extlen_t rtxlen_in, rtxlen_out;
| ^~~~~~~~~
vim +/rtxlen_in +6593 fs/xfs/libxfs/xfs_bmap.c
6541
6542 /*
6543 * Given a file and a free physical extent, map it into the file at the same
6544 * offset if the file were a sparse image of the physical device. Set @mval to
6545 * whatever mapping we added to the file.
6546 */
6547 int
6548 xfs_bmapi_freesp(
6549 struct xfs_trans **tpp,
6550 struct xfs_inode *ip,
6551 xfs_fsblock_t fsbno,
6552 xfs_extlen_t len,
6553 struct xfs_bmbt_irec *mval)
6554 {
6555 struct xfs_bmbt_irec irec;
6556 struct xfs_mount *mp = ip->i_mount;
6557 xfs_fileoff_t startoff;
6558 bool isrt = XFS_IS_REALTIME_INODE(ip);
6559 int nimaps;
6560 int error;
6561
6562 trace_xfs_bmapi_freesp(ip, fsbno, len);
6563
6564 error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK,
6565 XFS_IEXT_ADD_NOSPLIT_CNT);
6566 if (error)
6567 return error;
6568
6569 if (isrt)
6570 startoff = fsbno;
6571 else
6572 startoff = xfs_fsblock_to_fileoff(mp, fsbno);
6573
6574 /* Make sure the entire range is a hole. */
6575 nimaps = 1;
6576 error = xfs_bmapi_read(ip, startoff, len, &irec, &nimaps, 0);
6577 if (error)
6578 return error;
6579
6580 if (irec.br_startoff != startoff ||
6581 irec.br_startblock != HOLESTARTBLOCK ||
6582 irec.br_blockcount < len)
6583 return -EINVAL;
6584
6585 /*
6586 * Allocate the physical extent. We should not have dropped the lock
6587 * since the scan of the free space metadata, so this should work,
6588 * though the length may be adjusted to play nicely with metadata space
6589 * reservations.
6590 */
6591 if (isrt) {
6592 xfs_rtblock_t rtx_in, rtx_out;
> 6593 xfs_extlen_t rtxlen_in, rtxlen_out;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (19119 bytes)
Powered by blists - more mailing lists