[lustre-devel] [PATCH 2/5] lustre: obdclass: llog to handle gaps
James Simmons
jsimmons at infradead.org
Wed May 11 12:38:40 PDT 2022
From: Alex Zhuravlev <bzzz at whamcloud.com>
due to old errors an update llog can contain gaps in index.
this shouldn't block llog processing and recovery. actual
gaps in transaction sequence should be catched by VBR.
WC-bug-id: https://jira.whamcloud.com/browse/LU-15645
Signed-off-by: Alex Zhuravlev <bzzz at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46837
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko at hpe.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/obdclass/llog.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/fs/lustre/obdclass/llog.c b/fs/lustre/obdclass/llog.c
index 768bc47..acede87 100644
--- a/fs/lustre/obdclass/llog.c
+++ b/fs/lustre/obdclass/llog.c
@@ -430,23 +430,16 @@ static int llog_process_thread(void *arg)
continue;
}
- if (rec->lrh_index != index) {
- /*
- * the last time we couldn't parse the block due
- * to corruption, thus has no idea about the
- * next index, take it from the block, once.
+ if (rec->lrh_index > index) {
+ /* the record itself looks good, but we met a
+ * gap which can be result of old bugs, just
+ * keep going
*/
- if (refresh_idx) {
- refresh_idx = false;
- index = rec->lrh_index;
- } else {
- CERROR("%s: "DFID" Invalid record: index %u but expected %u\n",
- loghandle2name(loghandle),
- PFID(&loghandle->lgh_id.lgl_oi.oi_fid),
- rec->lrh_index, index);
- rc = -ERANGE;
- goto out;
- }
+ CERROR("%s: "DFID" index %u, expected %u\n",
+ loghandle2name(loghandle),
+ PFID(&loghandle->lgh_id.lgl_oi.oi_fid),
+ rec->lrh_index, index);
+ index = rec->lrh_index;
}
CDEBUG(D_OTHER,
--
1.8.3.1
More information about the lustre-devel
mailing list