tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
reserve-rt-metadata-space
head: 51f17deded84ae5863d2220a0a7c152ef4a8bbb2
commit: 4d8f99e0a4197987823f6df1681efd02e87c1b2a [109/196] xfs: add a ->xchg_file_range
handler
config: powerpc64-randconfig-r016-20210115 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
d7bc3b7ce23b664d6620cdc32370a8614523ca2f)
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 4d8f99e0a4197987823f6df1681efd02e87c1b2a
# 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>:61: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/xfs_xchgrange.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>:63: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/xfs_xchgrange.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>:65: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/xfs_xchgrange.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>:67: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/xfs_xchgrange.c:16:
fs/xfs/xfs_quota.h:185: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:141: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:190:1: error: redefinition of 'xfs_quota_reserve_blkres'
xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t nblks,
^
fs/xfs/xfs_quota.h:154:19: note: previous definition is here
static inline int xfs_quota_reserve_blkres(struct xfs_inode *ip,
^
fs/xfs/xfs_quota.h:195: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:141:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
> fs/xfs/xfs_xchgrange.c:136:41: error: incompatible pointer types
passing 'struct xfs_trans **' to parameter of type 'struct xfs_trans *';
dereference with * [-Werror,-Wincompatible-pointer-types]
error =
xfs_trans_reserve_quota_nblks(tpp, req->ip1,
^~~
*
fs/xfs/xfs_quota.h:141:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
fs/xfs/xfs_xchgrange.c:146:41: error: incompatible pointer types passing 'struct
xfs_trans **' to parameter of type 'struct xfs_trans *'; dereference with *
[-Werror,-Wincompatible-pointer-types]
error = xfs_trans_reserve_quota_nblks(tpp, req->ip2,
^~~
*
fs/xfs/xfs_quota.h:141:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
fs/xfs/xfs_xchgrange.c:162:40: error: incompatible pointer types passing 'struct
xfs_trans **' to parameter of type 'struct xfs_trans *'; dereference with *
[-Werror,-Wincompatible-pointer-types]
error = xfs_trans_reserve_quota_nblks(tpp, req->ip1, ip1_mapped, 0,
^~~
*
fs/xfs/xfs_quota.h:141:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
fs/xfs/xfs_xchgrange.c:167:39: error: incompatible pointer types passing 'struct
xfs_trans **' to parameter of type 'struct xfs_trans *'; dereference with *
[-Werror,-Wincompatible-pointer-types]
return xfs_trans_reserve_quota_nblks(tpp, req->ip2, ip2_mapped, 0,
^~~
*
fs/xfs/xfs_quota.h:141:67: note: passing argument to parameter 'tp' here
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
^
6 warnings and 7 errors generated.
vim +136 fs/xfs/xfs_xchgrange.c
117
118 /* Make a particular type of quota reservation. */
119 STATIC int
120 xfs_xchg_range_reserve_quota_blocks(
121 struct xfs_trans **tpp,
122 const struct xfs_swapext_req *req,
123 xfs_filblks_t ip1_mapped,
124 xfs_filblks_t ip2_mapped,
125 unsigned int qmopts,
126 bool *quota_retry)
127 {
128 int error;
129
130 /*
131 * For each file, compute the net gain in the number of blocks that
132 * will be mapped into that file and reserve that much quota. The
133 * quota counts must be able to absorb at least that much space.
134 */
135 if (ip2_mapped > ip1_mapped) {
136 error = xfs_trans_reserve_quota_nblks(tpp, req->ip1,
137 ip2_mapped - ip1_mapped, 0,
138 qmopts, quota_retry);
139 if (!(*tpp) && req->ip1 != req->ip2)
140 xfs_iunlock(req->ip2, XFS_ILOCK_EXCL);
141 if (error || *quota_retry)
142 return error;
143 }
144
145 if (ip1_mapped > ip2_mapped) {
146 error = xfs_trans_reserve_quota_nblks(tpp, req->ip2,
147 ip1_mapped - ip2_mapped, 0,
148 qmopts, quota_retry);
149 if (!(*tpp) && req->ip1 != req->ip2)
150 xfs_iunlock(req->ip1, XFS_ILOCK_EXCL);
151 if (error || *quota_retry)
152 return error;
153 }
154
155 /*
156 * For each file, forcibly reserve the gross gain in mapped blocks so
157 * that we don't trip over any quota block reservation assertions.
158 * We must reserve the gross gain because the quota code subtracts from
159 * bcount the number of blocks that we unmap; it does not add that
160 * quantity back to the quota block reservation.
161 */
162 error = xfs_trans_reserve_quota_nblks(tpp, req->ip1, ip1_mapped, 0,
163 XFS_QMOPT_FORCE_RES | qmopts, NULL);
164 if (error)
165 return error;
166
167 return xfs_trans_reserve_quota_nblks(tpp, req->ip2, ip2_mapped, 0,
168 XFS_QMOPT_FORCE_RES | qmopts, NULL);
169 }
170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org