Whamcloud - gitweb
LU-3591 lfsck: repair unmatched MDT-OST objects pairs 19/7519/26
authorFan Yong <fan.yong@intel.com>
Fri, 7 Feb 2014 01:26:49 +0000 (09:26 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 22 Feb 2014 18:34:17 +0000 (18:34 +0000)
commit2c67b17fd183ef60baba74e914e96b9b292bfc39
treebc2bc135ea63e66cb260d9e6ea978e316888b1b0
parent46b927d45eb2ee5db3e35df2a0ade4c11ba9f345
LU-3591 lfsck: repair unmatched MDT-OST objects pairs

Sometimes, the MDT-object1 claims that the OST-object1 is one of its
child objects. But the OST-object1 says inconsistent information:

1. It claims invalid parent information, such as empty or bad parent
   FID information.
2. It claims that its parent is the MDT-object2, but the MDT-object2
   does not exist, or
3. The MDT-object2 exists, but it does not recognize the OST-object1.

Under such cases, the MDT-object layout information is trusted over
the OST-object back-pointer because it relates to user visible file
data. The OST-object back-pointer is only used for internal recovery
purposes and is not visible to the user, so does not affect proper
file usage information, nor was kept consistent for Lustre 1.8.x MDT
file-level backup/restore. The LFSCK will update the OST-object to
make it recognize the new parent.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I01e67baf661b0a9e1c3de37a35de86699b07d049
Reviewed-on: http://review.whamcloud.com/7519
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/ofd/ofd_io.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/tests/sanity-lfsck.sh