Whamcloud - gitweb
LU-7585 osd-ldiskfs: auto scrub control
Originally, there was a lproc interface in OSD, named
"auto_scrub", used for the control of auto detecting
inconsistent OI mapping and trigger OI scrub. But such
switch is too simily, either 'on' or 'off'. It is not
convenient for the real system control. For example:
If we just finished one cycle OI scrub, should we auto
detect OI inconsistency in the subsequent lookup()?
If yes, it will cause some unnecessary overhead. But
if no, then as long as there was once OI scrub, we will
have no more chance to auto detect corrupted OI mapping.
To resolve such trouble, this patch enhances the lproc
interface "auto_scrub" to allow the system administrator
to specify how long (in seconds) the system can be trusted
after the lastest OI scrub. During such trusted interval,
we will not auto detect inconsistent OI mapping. the
default value is one month (60 * 60 * 24 * 30).
The patch also replaces cfs_time_current_sec() with
ktime_get_real_seconds() for some cleanup work.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iae2c7dd1da92c27d40357c62cd94e886228c86f7
Reviewed-on: https://review.whamcloud.com/29710
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>