Whamcloud - gitweb
LU-14119 lfsck: check linkea if it's newly added 70/43270/2
authorLai Siyao <lai.siyao@whamcloud.com>
Thu, 14 Jan 2021 09:14:01 +0000 (17:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 16 May 2021 22:07:07 +0000 (22:07 +0000)
commit3e59ed26d04da1fa2891b8f5263b0481d7c69f22
treebb42fe38fad9145df579c3f57714f5abfe7cdd6f
parent9055a0a1f3720aed844941213c676508bd30a69e
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.

Lustre-change: https://review.whamcloud.com/41261
Lustre-commit: afd00cacd0b6ef87282887b4e965350a9c1a6821

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