Whamcloud - gitweb
LU-3934 scrub: detect upgraded from 1.8 correctly 25/7625/2
authorFan Yong <fan.yong@intel.com>
Sun, 18 Aug 2013 22:00:46 +0000 (06:00 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 30 Oct 2013 21:47:32 +0000 (21:47 +0000)
commitff6587b412249c0cdf70eceae88fc97aa218b0eb
tree5624b988d198a9ceffcb762bc2293b6f0f949cb2
parentf0ae89b4dbbd72f0d12869d6253eefcf6f0e294f
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: I5e57aae972e4fe93d3cb9e7cc7ca2e5b95dce4b2
Reviewed-on: http://review.whamcloud.com/7625
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_oi.c