Whamcloud - gitweb
LU-1453 scrub: auto trigger OI scrub more flexible
Generally, scanning the whole device for OI scrub routine check may
takes some long time. If the whole system only contains several bad
OI mappings, then it is not worth to trigger OI scrub automatically
with full speed when some bad OI mapping is auto-detected. Instead,
we can make the OI scrub to fix the found bad OI mappings only, and
if more and more bad OI mappings are found as to exceeds some given
threshold that can be adjusted via some proc interface, then the OI
scrub will run with full speed to scan whole device.
Currently, we offer two kinds of thresholds for triggering OI scrub
to scan the whole device:
1) "the total OI mappings count" vs "the bad OI mappings count".
If such ratio is low than the given threshold that can be set
via the proc interface "full_scrub_ratio", then trigger urgent
mode OI scrub.
2) "the speed of found the bad OI mappings". If the speed exceeds
the given threshold that can be adjusted via the proc interface
"full_scrub_speed", then trigger urgent mode OI scrub.
Test-Parameters: mdsfilesystemtype=ldiskfs mdtfilesystemtype=ldiskfs \
ostfilesystemtype=ldiskfs envdefinitions=ONLY=4 testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibc4592fef1da11994ec30eb348d20576be5ae54b
Reviewed-on: http://review.whamcloud.com/12738
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>