tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
reserve-rt-metadata-space
head: cf302d785b20281da031865d0e18e4b50bff6bbf
commit: 1feff90cefef24e947c0d10d800d87d16a4602a7 [64/196] xfs: repair damaged symlinks
config: powerpc64-randconfig-r005-20210118 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
22b68440e1647e16b5ee24b924986207173c02d1)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs reserve-rt-metadata-space
git checkout 1feff90cefef24e947c0d10d800d87d16a4602a7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:190:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/xfs/scrub/symlink_repair.c:6:
In file included from fs/xfs/xfs.h:22:
In file included from fs/xfs/xfs_linux.h:31:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:192:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/xfs/scrub/symlink_repair.c:6:
In file included from fs/xfs/xfs.h:22:
In file included from fs/xfs/xfs_linux.h:31:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:194:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/xfs/scrub/symlink_repair.c:6:
In file included from fs/xfs/xfs.h:22:
In file included from fs/xfs/xfs_linux.h:31:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro
'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:196:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/xfs/scrub/symlink_repair.c:22:
fs/xfs/xfs_quota.h:176:39: error: incompatible pointer types passing 'struct
xfs_trans **' to parameter of type 'struct xfs_trans *'; remove &
[-Werror,-Wincompatible-pointer-types]
return xfs_trans_reserve_quota_nblks(&tp, ip, -nblks, -ninos, flags,
^~~
fs/xfs/xfs_quota.h:132:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
fs/xfs/xfs_quota.h:181:1: error: redefinition of 'xfs_quota_reserve_blkres'
xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t nblks,
^
fs/xfs/xfs_quota.h:145:19: note: previous definition is here
static inline int xfs_quota_reserve_blkres(struct xfs_inode *ip,
^
fs/xfs/xfs_quota.h:186:39: error: incompatible pointer types passing 'struct
xfs_trans **' to parameter of type 'struct xfs_trans *'; remove &
[-Werror,-Wincompatible-pointer-types]
return xfs_trans_reserve_quota_nblks(&tp, ip, nblks, 0, flags, NULL);
^~~
fs/xfs/xfs_quota.h:132:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
> fs/xfs/scrub/symlink_repair.c:213:40: error: incompatible pointer
types passing 'struct xfs_trans **' to parameter of type 'struct xfs_trans
*'; remove & [-Werror,-Wincompatible-pointer-types]
error =
xfs_trans_reserve_quota_nblks(&sc->tp, sc->ip, resblks, 0,
^~~~~~~
fs/xfs/xfs_quota.h:132:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
12 warnings and 4 errors generated.
vim +213 fs/xfs/scrub/symlink_repair.c
185
186 /*
187 * Reinitialize a link target. Caller must ensure the inode is joined to
188 * the transaction.
189 */
190 STATIC int
191 xrep_symlink_reinitialize(
192 struct xfs_scrub *sc)
193 {
194 xfs_fsblock_t fs_blocks;
195 unsigned int target_len;
196 unsigned int resblks;
197 unsigned int quota_flags = XFS_QMOPT_RES_REGBLKS;
198 bool quota_retry = false;
199 int error;
200
201 /* How many blocks do we need? */
202 target_len = strlen(sc->buf);
203 ASSERT(target_len != 0);
204 if (target_len == 0 || target_len > XFS_SYMLINK_MAXLEN)
205 return -EFSCORRUPTED;
206
207 if (sc->flags & XCHK_TRY_HARDER)
208 quota_flags |= XFS_QMOPT_FORCE_RES;
209
210 /* Set up to reinitialize the target. */
211 fs_blocks = xfs_symlink_blocks(sc->mp, target_len);
212 resblks = XFS_SYMLINK_SPACE_RES(sc->mp, target_len, fs_blocks);
213 error = xfs_trans_reserve_quota_nblks(&sc->tp, sc->ip,
resblks, 0,
214 quota_flags, "a_retry);
215 if (error)
216 return error;
217 if (quota_retry) {
218 /* Release everything and try harder. */
219 return -EDEADLOCK;
220 }
221
222 /* Try to write the new target back out. */
223 error = xfs_symlink_write_target(sc->tp, sc->ip, sc->buf, target_len,
224 fs_blocks, resblks);
225 if (error)
226 return error;
227
228 /* Finish up any block mapping activities. */
229 return xfs_defer_finish(&sc->tp);
230 }
231
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org