Whamcloud - gitweb
LU-3336 lfsck: regenerate lost layout EA 10/7810/21
authorFan Yong <fan.yong@intel.com>
Wed, 12 Feb 2014 19:32:41 +0000 (03:32 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 27 Feb 2014 15:27:57 +0000 (15:27 +0000)
commit32a11dbd310b44d2a6e084c48310f21ef6649145
treeaced42e3a072af50acba55259eccc50f57791bc3
parent77eea1985bb1655e58c8b7df00703b4f08b58ec7
LU-3336 lfsck: regenerate lost layout EA

To find out orphan OST-objects, the LFSCK on OST side maintains
two bitmaps in RAM for the OST-object accessed during the LFSCK.
After the first cycle system scanning, the LFSCK got the bitmap
for the known OST-objects, and got another bitmap for which OST
objects have been referenced by MDT-objects. Then the LFSCK can
know which OST-objects are not referenced by any MDT-object via
comparing the two bitmaps.

If the MDT-object exists, then check the layout EA. If related
layout EA is empty, then fill the layout EA slot with the given
OST-object stripe information. If the given OST-object stripe
index exceeds current layout EA size, then extend the layout EA
and fill the gap slot(s) as empty, which can be filled by others.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie542289b397576be457b04792e845324d6926836
Reviewed-on: http://review.whamcloud.com/7810
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_layout.c
lustre/lod/lod_object.c
lustre/osp/osp_object.c
lustre/tests/sanity-lfsck.sh