Whamcloud - gitweb
LU-6861 scrub: only trigger full OI scrub when necessary 51/16951/6
authorFan Yong <fan.yong@intel.com>
Wed, 21 Oct 2015 02:43:49 +0000 (10:43 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 Jun 2016 03:45:51 +0000 (03:45 +0000)
commit76b4684a576ea423561fafb5fdb5f6f762e6b3e0
tree62ccd026cded15b1c38f1b7e679b04a1fbcbd5b3
parentd226464acaacccd240da43dcc22372fbf8cb04a6
LU-6861 scrub: only trigger full OI scrub when necessary

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.

Our current OI scrub auto-trigger control mechanism can avoid most
of unnecessary whole-device based scanning. But it missed one case
that the FID lookup for remote MDT-object and may cause unexpected
whole-device based OI scrub. This patch is for handle such corner.

Fix the sanity-scrub.sh test_4a, test_4b, and test_4c to search for
"prior_updated" and not "updated_prior" in the scrub status file.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I776c44b1dbc7357817d42d9b1ff6011226fe292b
Reviewed-on: http://review.whamcloud.com/16951
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>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_oi.c
lustre/osd-ldiskfs/osd_oi.h
lustre/osd-ldiskfs/osd_scrub.c
lustre/tests/sanity-scrub.sh