Whamcloud - gitweb
LU-8886 lfsck: handle -ENODATA for the end of iteration 56/24056/2
authorFan Yong <fan.yong@intel.com>
Sun, 28 Aug 2016 09:41:14 +0000 (17:41 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 23 Dec 2016 05:05:34 +0000 (05:05 +0000)
commit8ff4556055edf496a0d23cf35fd0d63619143363
tree118c3bd99ddfd2a9f8462e8d5e71ecc728be2e9c
parentb896484e990667e428e35681552276012d4e444f
LU-8886 lfsck: handle -ENODATA for the end of iteration

When the LFSCK engine makes checkpoint, it will record the current
position (hash) of the iteration that can be used to resume the
LFSCK scanning from the latest checkpoint. But if someone removed
the target corresponding to the LFSCK checkpoint position, then
the LFSCK will start scanning from the 'next' position when try to
resume from the latest checkpoint. But if the 'next' hits the end
of the iteration, the lower layer (ldiskfs) will return "-ENODATA"
for dt_it_ops::load() call. The LFSCK engine needs to handle such
case properly to avoid reguarding it as failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5a6a46cf3eefbdc680780abcc3402860736d6e0a
Reviewed-on: https://review.whamcloud.com/24056
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lfsck/lfsck_engine.c