Whamcloud - gitweb
LU-7302 scrub: join the running OI scrub properly
Sometimes, the OI scrub can be triggered as partial mode by
randomly found inconsistent OI mapping(s). Under such case,
if the sysadmin triggers LFSCK/OI scrub (full mode) manually,
the partial mode OI scrub needs to be converted as full mode
via osd_scrub_join(). Before that, it will check whether the
current OI scrub is full mode or not. Originally, we checked
the SF_AUTO flags (scrub::os_file.sf_flags) only, but ignored
the partial mode (scrub::os_partial_scan). The partial mode
OI scrub will NOT change the scrub iteration cursor (srub::
os_pos_current). So if miss to convert the partial OI scrub,
the subsequent inode table based iteration will be blocked
inside osd_otable_it_next() as following:
if (it->ooi_cache.ooc_pos_preload >= scrub->os_pos_current)
l_wait_event(thread->t_ctl_waitq,
osd_otable_it_wakeup(scrub, it),
&lwi);
This patch fix such issue by checking the conditions properly.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I41cf519e717f356f21a1eebebefda1e44a3bd5ae
Reviewed-on: http://review.whamcloud.com/18175
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>