Whamcloud - gitweb
LU-15886 lfsck: remove unreasonable assertions 47/47447/6
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 18 May 2022 22:21:52 +0000 (18:21 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Jul 2022 05:35:22 +0000 (05:35 +0000)
commitb52b52c2d142cec15ae35e91f878d1063c094bc4
tree545d731cf1d87e440b2ed50a10101a94f58cfc44
parent54a2d4662b58e2ba4224b0e6b487a0a7cd2f28bb
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.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: If114c7882a2c083e83fcfac5981eddfa526d1426
Reviewed-on: https://review.whamcloud.com/47447
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_lib.c
lustre/lfsck/lfsck_namespace.c