Whamcloud - gitweb
LU-5511 lfsck: repair unmatched parent-child pairs 86/11486/22
authorFan Yong <fan.yong@intel.com>
Mon, 4 Aug 2014 12:33:58 +0000 (20:33 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 30 Sep 2014 03:49:22 +0000 (03:49 +0000)
commitd35997e6e100acca3effb75ca402c9df7f6252ef
tree5408b6fe26cb978689d0bb5bb25b87163c36367e
parent1d4073a2f3af282796fa09e1780365801599c8f5
LU-5511 lfsck: repair unmatched parent-child pairs

If the parent directry_A reference the child directory_B via the
name entry_C, but the child directory_B back references another
parent directory_D via its ".." name entry, then the namespace
LFSCK should can find out such inconsistency in the second-stage
scanning and repair it by trusting the name entry_B basically.

Usually, for local filesystem or Lustre backend system, such as
ldiskfs, the local filesystem consistency verification tools,
such as e2fsck can guarantee such consistency. So the namespace
LFSCK will mainly focus on the corss-MDTs parent-child pairs
consistency verification.

Lustre does not support hardlink on directory object. So if the
directory contains multiple linkEA entries or bad linkEA entry,
then the namespace LFSCK should can find out and repair related
inconsistency.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If8cb02f76329fe04fe3a6c280e6926d014654322
Reviewed-on: http://review.whamcloud.com/11486
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_engine.c
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/mdd/mdd_dir.c
lustre/osd-ldiskfs/osd_handler.c
lustre/tests/sanity-lfsck.sh