* [djwong-xfs:vectorized-scrub 56/292] fs/xfs/scrub/health.c:187:17: warning: variable 'mask' set but not used
@ 2024-02-13 13:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-13 13:19 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: 670c4f59f7fbaa168381cdf67c052028a539ab0a
commit: 2aef4d5823b54fc871dff30508c6cdbface594d7 [56/292] xfs: remember sick inodes that get inactivated
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240213/202402132108.X3PJZJJq-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240213/202402132108.X3PJZJJq-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402132108.X3PJZJJq-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/xfs/scrub/health.c:187:17: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
187 | unsigned int mask = sc->sick_mask;
| ^
1 warning generated.
vim +/mask +187 fs/xfs/scrub/health.c
151
152 /*
153 * Update filesystem health assessments based on what we found and did.
154 *
155 * If the scrubber finds errors, we mark sick whatever's mentioned in
156 * sick_mask, no matter whether this is a first scan or an
157 * evaluation of repair effectiveness.
158 *
159 * Otherwise, no direct corruption was found, so mark whatever's in
160 * sick_mask as healthy.
161 */
162 void
163 xchk_update_health(
164 struct xfs_scrub *sc)
165 {
166 struct xfs_perag *pag;
167 bool bad;
168
169 if (!sc->sick_mask)
170 return;
171
172 bad = (sc->sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT |
173 XFS_SCRUB_OFLAG_XCORRUPT));
174 switch (type_to_health_flag[sc->sm->sm_type].group) {
175 case XHG_AG:
176 pag = xfs_perag_get(sc->mp, sc->sm->sm_agno);
177 if (bad)
178 xfs_ag_mark_corrupt(pag, sc->sick_mask);
179 else
180 xfs_ag_mark_healthy(pag, sc->sick_mask);
181 xfs_perag_put(pag);
182 break;
183 case XHG_INO:
184 if (!sc->ip)
185 return;
186 if (bad) {
> 187 unsigned int mask = sc->sick_mask;
188
189 /*
190 * If we're coming in for repairs then we don't want
191 * sickness flags to propagate to the incore health
192 * status if the inode gets inactivated before we can
193 * fix it.
194 */
195 if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)
196 mask |= XFS_SICK_INO_FORGET;
197 xfs_inode_mark_corrupt(sc->ip, sc->sick_mask);
198 } else
199 xfs_inode_mark_healthy(sc->ip, sc->sick_mask);
200 break;
201 case XHG_FS:
202 if (bad)
203 xfs_fs_mark_corrupt(sc->mp, sc->sick_mask);
204 else
205 xfs_fs_mark_healthy(sc->mp, sc->sick_mask);
206 break;
207 case XHG_RT:
208 if (bad)
209 xfs_rt_mark_corrupt(sc->mp, sc->sick_mask);
210 else
211 xfs_rt_mark_healthy(sc->mp, sc->sick_mask);
212 break;
213 default:
214 ASSERT(0);
215 break;
216 }
217 }
218
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-13 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 13:19 [djwong-xfs:vectorized-scrub 56/292] fs/xfs/scrub/health.c:187:17: warning: variable 'mask' 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.