Whamcloud - gitweb
LU-16203 llog: skip bad records in llog 76/48776/5
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 3 Oct 2022 15:35:25 +0000 (18:35 +0300)
committerMikhail Pershin <mpershin@whamcloud.com>
Sat, 29 Oct 2022 13:55:49 +0000 (16:55 +0300)
commit5896c420d82507f90473414df3e6d342126cc21f
treead544e0a0ef75dfaee2aa760ac7fab0a0dd15fb4
parent6aee406c84b6b8fddf08b560acfcdf7c13c97e63
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
lustre/obdclass/llog.c
lustre/obdclass/llog_osd.c
lustre/obdclass/llog_test.c