Whamcloud - gitweb
LU-14119 lfsck: check linkea if it's newly added 61/41261/10
authorLai Siyao <lai.siyao@whamcloud.com>
Thu, 14 Jan 2021 09:14:01 +0000 (17:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 10 Apr 2021 17:42:26 +0000 (17:42 +0000)
commitafd00cacd0b6ef87282887b4e965350a9c1a6821
tree908890d5eb3f770dae8635e486892cd484e52454
parente6c63940ab354dddffb90b66f7aa9bfdb2a33677
LU-14119 lfsck: check linkea if it's newly added

In LFSCK phase one, if new linkea entry is added, and final linkea
entry count is more than one, add file in trace file, so that the
linkea sanity will be checked in phase two.

And in phase two check, if link parent FID can't be mapped to valid
inode, remove it from linkea.

Add sanity-lfsck 1d, which changed parent directory FID in LMA,
therefore the FID in LMA mismatches with parent FID in child linkea,
verify LFSCK can fix such inconsistency.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I315983d262110c1e36c3893fa2e51925d96c51a7
Reviewed-on: https://review.whamcloud.com/41261
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_namespace.c
lustre/tests/sanity-lfsck.sh