Whamcloud - gitweb
LU-3935 scrub: support dryrun mode OI scrub 20/7720/4
authorFan Yong <fan.yong@intel.com>
Sun, 25 Aug 2013 14:11:25 +0000 (22:11 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Sep 2013 17:02:38 +0000 (17:02 +0000)
commitbfbc2ea49b14a56791911557e01f966acb58b8da
tree48be35a6310b1ac01a2ec21b50cf5a42b71549da
parent3ce87d9ab48ac1545c76e9710639941c8221ec9d
LU-3935 scrub: support dryrun mode OI scrub

The administrator can detect whether there are any inconsistent
OI mappings but without repairing them via the command:
lctl lfsck_start --dryrun on -M <$device>

Under default mode, dryrun is "off". When the device is mounted,
the initial OI scrub will detect whether there are upgrade case,
or file-level backup/resotre case, or OI file(s) recreated case.
If found some inconsistency, it will trigger non-dryrun mode OI
scrub automatically. If the administrator does NOT want to such
auto non-dryrun OI scrub to avoid some unexpected repairing, he
(or she) can specify "-o noscrub" when mount the device.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If00433aa40b43f0be284215009a2b01898fbad35
Reviewed-on: http://review.whamcloud.com/7720
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/include/dt_object.h
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-ldiskfs/osd_scrub.h
lustre/tests/sanity-scrub.sh