Whamcloud - gitweb
LU-5515 lfsck: repair bad file type in name entry 48/12248/3
authorFan Yong <fan.yong@intel.com>
Sun, 17 Aug 2014 07:58:04 +0000 (15:58 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Thu, 16 Oct 2014 17:07:11 +0000 (17:07 +0000)
commit901f5186323eb6df71921bd093aa60d37cde77be
treeeac148aab9bb4484f54df147f94f5ff7ae5e7e7a
parent7093fb094f0cf7ea1a5c9a21b198f41f2558a9b8
LU-5515 lfsck: repair bad file type in name entry

If the file type stored in the name entry does not match the file
type claimed by the object, then trust the object and update the
file type in the name entry.

At the same time, if the object does not recognize the name entry
(via the linkEA), then it is quite possible that the name entry is
corrupted. Then remove the bad name entry from namespace.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I616b482005f6379dd10bcd17f656b0ea3dd98111
Reviewed-on: http://review.whamcloud.com/12248
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/osd-ldiskfs/osd_handler.c
lustre/tests/sanity-lfsck.sh