Whamcloud - gitweb
LU-5512 lfsck: repair dangling name entry 30/11330/29
authorFan Yong <fan.yong@intel.com>
Wed, 6 Aug 2014 07:02:54 +0000 (15:02 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 30 Sep 2014 03:54:25 +0000 (03:54 +0000)
commit3d1ffca751b2970c3223b0f4fd3573428377c66f
tree1715c7939807baeda90cc61ea670b2cc97c431e9
parentd35997e6e100acca3effb75ca402c9df7f6252ef
LU-5512 lfsck: repair dangling name entry

If the MDT-object referenced by the name entry is lost, then the
namespace LFSCK needs to repair the inconsistency as required:

1) Keep the inconsistency there and report the inconsistency case,
   then give the chance to the application to find related issues,
   and the users can make the decision about how to handle it with
   more human knownledge. (by default)

2) Re-create the missed MDT-object with the FID (in the name entry)

The LFSCK will allow the administrator to specify how to handle the
dangling name entry via a new option "-C" when trigger the LFSCK:

[-Coff] or [--create_mdtobj=off]:
Report the inconsistency via log, but keep the dangling name entry
there without repairing. (by default)

-C[on] or --create_mdtobj[=on]:
Create the lost MDT-object.

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