Whamcloud - gitweb
LU-16203 llog: skip bad records in llog
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 3 Oct 2022 15:35:25 +0000 (18:35 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 4 Nov 2022 03:56:54 +0000 (03:56 +0000)
commit129f824ec2777c36787b25fef5ae2c08a6104c5a
tree40bfabd0f8aa40fe0af7181e59a69315dc1d5265
parente8ddb2f550072cdd3489389c107af3e892a21f66
LU-16203 llog: skip bad records in llog

This patch is further development of idea to skip bad
(corrupted) llogs data. If llog has fixed-size records
then it is possible to skip one record but not rest of
llog block.

Patch also fixes the skipping to the next chunk:
 - make sure to skip to the next block for partial chunk
   or it causes the same block re-read.
 - handle index == 0 as goal for the llog_next_block() as
   expected exclusion and just return requested block
 - set new index after block was skipped to the first one
   in block
 - don't create fake padding record in llog_osd_next_block()
   as the caller can handle it and would know about
 - restore test_8 functionality to check corruption handling

Lustre-change: https://review.whamcloud.com/48776
Lustre-commit: TBD (from 5896c420d82507f90473414df3e6d342126cc21f)

Fixes: ec4194e4e78c ("LU-11591 llog: add synchronization for the last record")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I6f88269e8626269268352f8bfd6d7950de438f3a
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/48897
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/obdclass/llog.c
lustre/obdclass/llog_osd.c
lustre/obdclass/llog_test.c