Whamcloud - gitweb
LU-15886 lfsck: remove unreasonable assertions
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 18 May 2022 22:21:52 +0000 (18:21 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Jun 2022 20:43:37 +0000 (20:43 +0000)
commita77f88b83a9b6ffe8ecd0f7e2c7183986e890c4d
treed3c0e1678227d010feb8c8fac2b924abec4760a7
parent40837fbb4b5fba12889931625ac471b786cca607
LU-15886 lfsck: remove unreasonable assertions

Remove unreasonable assertions in LFSCK code:
* lfsck->li_obj_dir and lfsck->li_lmv may be NULL if object wan't
  initialized successfully.
* orphan objects under ldiskfs /lost+found may not exist.
* object may not be directory in lfsck_verify_lpf()->
  lfsck_verify_linkea().
* for corner case
  (leh->leh_reccount == 0 && leh->leh_overflow_time != 0),
  LASSERT(ldata->ld_leh->leh_reccount > 0) will be triggerred in
  lfsck_namespace_linkea_clear_overflow(), remove this assertion,
  and this corner case can be handled correctly in current lfsck
  code.

Lustre-change: https://review.whamcloud.com/47447/
Lustre-commit: 0c1f5aa5e20334746b22b4e215af5153de7d6f4a (TBD)

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: If114c7882a2c083e83fcfac5981eddfa526d1426
Reviewed-on: https://review.whamcloud.com/47621
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c