Whamcloud - gitweb
LU-5516 lfsck: repair the lost name entry 49/12249/3
authorFan Yong <fan.yong@intel.com>
Sun, 17 Aug 2014 07:58:21 +0000 (15:58 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Thu, 16 Oct 2014 17:09:03 +0000 (17:09 +0000)
commita43dc396eace545cee450b082a3b28012c791528
tree61e7542bf8868e99a0423c2cc25eeeb63cc5d246
parent901f5186323eb6df71921bd093aa60d37cde77be
LU-5516 lfsck: repair the lost name entry

If the MDT-object has a linkEA entry that back references a name
entry under some parent directory, but such parent directory has
no the claimed name entry. On the other hand, if the MDT-object's
linkEA entries count is not larger than the MDT-object's hard links
count. Under such case, it is quite possible that the name entry is
lost. So the object may be an orphan. Then the LFSCK should add the
missed name entry back to the namespace according to the linkEA entry.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I88ae352e4b14cb810b98f2b9956aeafcc005082b
Reviewed-on: http://review.whamcloud.com/12249
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_namespace.c
lustre/mdd/mdd_dir.c
lustre/tests/sanity-lfsck.sh