Whamcloud - gitweb
LU-16203 llog: skip bad records in llog 76/48776/6
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 3 Oct 2022 15:35:25 +0000 (18:35 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Nov 2022 08:50:37 +0000 (08:50 +0000)
commitcf121b16685fe2a271b1b3c5e97eabcfe01aac8a
tree277232b670f88d6fcb9bbf7f31a1fc66bb667c24
parent53b3d1de99277f8d3e4af475986802ee3dcdd304
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

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/fs/lustre-release/+/48776
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog.c
lustre/obdclass/llog_osd.c
lustre/obdclass/llog_test.c