Whamcloud - gitweb
LU-3593 lfsck: repair inconsistent layout EA 56/7456/26
authorFan Yong <fan.yong@intel.com>
Fri, 31 Jan 2014 06:55:02 +0000 (14:55 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 22 Feb 2014 07:27:01 +0000 (07:27 +0000)
commitfc46da199378d12f1c3d8b4b9200b815b57e8af7
tree80f6cb8afaf28b907b84ff3bd5486b1b840b2b83
parentdbb6623ef78a60c4fe71e798d52f8ec37281c12f
LU-3593 lfsck: repair inconsistent layout EA

The layout EA storing on the MDT-object records not only the file
layout but also some information which indicates the layout owner,
such as lov_mds_md.lmm_oi. They are generated from MDT-object FID,
with them we can know which file the layout EA belongs to. In the
LFSCK phase II, we need to verify whether such information in the
layout EA is correct or not by re-caculating from the MDT-object
FID. If inconsistency is found, trust the MDT-object FID rather
than the FID information in the layout EA, and repair the later.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3c31e19e9fabe66fe7ffdba2fe8569795ae49b4a
Reviewed-on: http://review.whamcloud.com/7456
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lod/lod_dev.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/tests/sanity-lfsck.sh