[lustre-devel] [PATCH 32/39] lustre: mdc: process changelogs_catalog from the oldest rec

James Simmons jsimmons at infradead.org
Thu Jan 21 09:16:55 PST 2021

From: Etienne AUJAMES <eaujames at ddn.com>

The chlg_load use the LLOG_CAT_FIRST to process changelogs. This
values will process record in the catalog always starting with index
0 to the newest record. So when catalog reach the end of indexes and
when records are saved at the beginning of catalog, the
llog_cat_process will ignore records at the end.

This patch change the "startcat" value LLOG_CAT_FIRST to 0 to scan
the catalog from the oldest record to the newest.

Fixes: d95486c4 (lustre: mdc: polling mode for changelog reader)
WC-bug-id: https://jira.whamcloud.com/browse/LU-14158
Lustre-commit: ad4c8633498848 ("LU-14158 mdc: process changelogs_catalog from the oldest rec")
Signed-off-by: Etienne AUJAMES <eaujames at ddn.com>
Reviewed-on: https://review.whamcloud.com/40786
Reviewed-by: Sebastien Buisson <sbuisson at ddn.com>
Reviewed-by: Mike Pershin <mpershin at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/mdc/mdc_changelog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/lustre/mdc/mdc_changelog.c b/fs/lustre/mdc/mdc_changelog.c
index 8531edb..f671f46 100644
--- a/fs/lustre/mdc/mdc_changelog.c
+++ b/fs/lustre/mdc/mdc_changelog.c
@@ -287,7 +287,7 @@ static int chlg_load(void *args)
 	struct llog_handle *llh = NULL;
 	int rc;
-	crs->crs_last_catidx = -1;
+	crs->crs_last_catidx = 0;
 	crs->crs_last_idx = 0;

More information about the lustre-devel mailing list