From e3feb6eb433a97aea0e9d49073e7ae30b6f6578d Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Wed, 24 Oct 2018 14:23:50 -0700 Subject: [PATCH] LU-11567 utils: llog_reader print changelog index When processing changelog type llogs, print the changelog index number with each changelog record. This allows one to compare the records on disk with the output of lfs changelog or relatives. Lustre-change: https://review.whamcloud.com/#/c/33473/ Lustre-commit: 78b0c3ce5a45b4919d53ac6cc886d6a9e713e05d Test-Parameters: trivial Signed-off-by: Patrick Farrell Signed-off-by: Olaf Faaland Change-Id: I0059cc34b39161462b3eadbb2512dc811c38705a Reviewed-by: Andreas Dilger Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/34018 Tested-by: Jenkins Tested-by: Maloo --- lustre/utils/llog_reader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index 769a40a..e676d26 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -654,8 +654,9 @@ static void print_hsm_action(struct llog_agent_req_rec *larr) void print_changelog_rec(struct llog_changelog_rec *rec) { - printf("changelog record id:0x%x cr_flags:0x%x cr_type:%s(0x%x)\n", - __le32_to_cpu(rec->cr_hdr.lrh_id), + printf("changelog record id:0x%x index:%llu cr_flags:0x%x " + "cr_type:%s(0x%x)\n", __le32_to_cpu(rec->cr_hdr.lrh_id), + __le64_to_cpu(rec->cr.cr_index), __le32_to_cpu(rec->cr.cr_flags), changelog_type2str(__le32_to_cpu(rec->cr.cr_type)), __le32_to_cpu(rec->cr.cr_type)); -- 1.8.3.1