Whamcloud - gitweb
LU-3934 scrub: detect upgraded from 1.8 correctly 19/7719/3
authorFan Yong <fan.yong@intel.com>
Sun, 25 Aug 2013 13:24:27 +0000 (21:24 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Sep 2013 16:59:11 +0000 (16:59 +0000)
commit3ce87d9ab48ac1545c76e9710639941c8221ec9d
treed4b988b796faa042561db85fe13eb349220b1ae0
parent92461ee9483af554f9efe89c5f9a44c9fb291f5a
LU-3934 scrub: detect upgraded from 1.8 correctly

The OI scrub should has the capability to detect the case of the MDT
device upgraded from lustre-1.8 and trigger full OI scrub to process
IGIF mapping into OI files.

Originally, we detect that by checking /ROOT/.lustre via initial OI
scrub, but if the MDT is upgraded to lustre-2.1 firstly, and then
continue to lustre-2.4, the such detect mechanism will be failed.
Because lustre-2.1 does not support OI scrub, but will create the
/ROOT/.lustre.

The new detect mechanism will combine the checking OI file name and OI
scrub successfully scan count: if there is old OI file "oi.16" and OI
scrub has never successfully run on the device, then it is regarded as
upgrading case.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I69d9b4f93797bb5589609d7ee0911ffd4262d0cb
Reviewed-on: http://review.whamcloud.com/7719
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_oi.c