Whamcloud - gitweb
LU-15868 lfsck: don't crash upon dir migration failure
authorLai Siyao <lai.siyao@whamcloud.com>
Tue, 17 May 2022 11:11:25 +0000 (07:11 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Jun 2022 20:43:26 +0000 (20:43 +0000)
commit40837fbb4b5fba12889931625ac471b786cca607
treeea9050e22bf5198c758ecbb4e38b09f759d4d350
parentcb3b95988ce8a10107ec4a49be0007f75ee677ca
LU-15868 lfsck: don't crash upon dir migration failure

LFSCK against directories that were migrated, but failed may crash,
it's because lost+found directory may not be initialized correctly,
and this error is skipped on purpose, add check in code that
dereference it.

lfsck_verify_lpf() may dereference NULL "child2".

lmv_name_to_stripe_index() should support stripe LMV, which is used
by LFSCK to verify name hash.

Add OBD_FAIL_OUT_EIO to simulate sub transaction failure.

Add sanity-lfsck 15d to verify LFSCK won't crash upon directory
migration failure.

Update sanity-lfsck 4 and 5 to start mds1 with OI scrub enabled, and
wait for mds1 OI scrub finish, otherwise LFSCK may fail to verify
lost+found later.

Lustre-change: https://review.whamcloud.com/47381/
Lustre-commit: 1022e485b5260e3bca0e2acafaf807dffbb02c66 (TBD)

Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity-lfsck env=ONLY=15d,ONLY_REPEAT=100
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I1b1872da2b4ef8f7403effc4d1d3e298c6a0b7e6
Reviewed-on: https://review.whamcloud.com/47620
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre_lmv.h
lustre/include/obd_support.h
lustre/lfsck/lfsck_engine.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/target/out_handler.c
lustre/tests/sanity-lfsck.sh