[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109181318.SZwSa7tO-lkp@intel.com>
Date: Sat, 18 Sep 2021 13:24:22 +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:zero-initialize-pmem 46/309] fs/xfs/scrub/iscan.c:66:1:
warning: no previous prototype for 'xchk_iscan_find_next'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git zero-initialize-pmem
head: f712bfd382f71deb666686b6d969dc10592e7d79
commit: 03f4db65226a4fd8c62e54b84899e542336dd8a5 [46/309] xfs: implement live quotacheck inode scan
config: arc-randconfig-r032-20210918 (attached as .config)
compiler: arc-elf-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=03f4db65226a4fd8c62e54b84899e542336dd8a5
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs zero-initialize-pmem
git checkout 03f4db65226a4fd8c62e54b84899e542336dd8a5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
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/scrub/iscan.c:66:1: warning: no previous prototype for 'xchk_iscan_find_next' [-Wmissing-prototypes]
66 | xchk_iscan_find_next(
| ^~~~~~~~~~~~~~~~~~~~
vim +/xchk_iscan_find_next +66 fs/xfs/scrub/iscan.c
60
61 /*
62 * Set *cursor to the next allocated inode after whatever it's set to now.
63 * If there are no more inodes in this AG, cursor is set to NULLAGINO.
64 */
65 int
> 66 xchk_iscan_find_next(
67 struct xfs_mount *mp,
68 struct xfs_trans *tp,
69 struct xfs_buf *agi_bp,
70 struct xfs_perag *pag,
71 xfs_agino_t *cursor)
72 {
73 struct xfs_inobt_rec_incore rec;
74 struct xfs_btree_cur *cur;
75 xfs_agnumber_t agno = pag->pag_agno;
76 xfs_agino_t lastino = NULLAGINO;
77 xfs_agino_t first, last;
78 xfs_agino_t agino = *cursor;
79 int has_rec;
80 int error;
81
82 /* If the cursor is beyond the end of this AG, move to the next one. */
83 xfs_agino_range(mp, agno, &first, &last);
84 if (agino > last) {
85 *cursor = NULLAGINO;
86 return 0;
87 }
88
89 /*
90 * Look up the inode chunk for the current cursor position. If there
91 * is no chunk here, we want the next one.
92 */
93 cur = xfs_inobt_init_cursor(mp, tp, agi_bp, pag, XFS_BTNUM_INO);
94 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &has_rec);
95 if (!error && !has_rec)
96 error = xfs_btree_increment(cur, 0, &has_rec);
97 for (; !error; error = xfs_btree_increment(cur, 0, &has_rec)) {
98 /*
99 * If we've run out of inobt records in this AG, move the
100 * cursor on to the next AG and exit. The caller can try
101 * again with the next AG.
102 */
103 if (!has_rec) {
104 *cursor = NULLAGINO;
105 break;
106 }
107
108 error = xfs_inobt_get_rec(cur, &rec, &has_rec);
109 if (error)
110 break;
111 if (!has_rec) {
112 error = -EFSCORRUPTED;
113 break;
114 }
115
116 /* Make sure that we always move forward. */
117 if (lastino != NULLAGINO &&
118 XFS_IS_CORRUPT(mp, lastino >= rec.ir_startino)) {
119 error = -EFSCORRUPTED;
120 break;
121 }
122 lastino = rec.ir_startino + XFS_INODES_PER_CHUNK - 1;
123
124 /*
125 * If this record only covers inodes that come before the
126 * cursor, advance to the next record.
127 */
128 if (rec.ir_startino + XFS_INODES_PER_CHUNK <= agino)
129 continue;
130
131 /*
132 * If the incoming lookup put us in the middle of an inobt
133 * record, mark it and the previous inodes "free" so that the
134 * search for allocated inodes will start at the cursor. Use
135 * funny math to avoid overflowing the bit shift.
136 */
137 if (agino >= rec.ir_startino)
138 xchk_iscan_adjust_start(agino + 1, &rec);
139
140 /*
141 * If there are allocated inodes in this chunk, find them,
142 * and update the cursor.
143 */
144 if (rec.ir_freecount < XFS_INODES_PER_CHUNK) {
145 int next = xfs_lowbit64(~rec.ir_free);
146
147 *cursor = rec.ir_startino + next;
148 break;
149 }
150 }
151
152 xfs_btree_del_cursor(cur, error);
153 return error;
154 }
155
---
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" (33656 bytes)
Powered by blists - more mailing lists