From: Olaf Faaland Date: Wed, 24 Oct 2018 21:23:50 +0000 (-0700) Subject: LU-11567 utils: llog_reader print changelog index X-Git-Tag: 2.12.0-RC1~13 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=78b0c3ce5a45b4919d53ac6cc886d6a9e713e05d 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. Test-Parameters: trivial Signed-off-by: Olaf Faaland Change-Id: I0059cc34b39161462b3eadbb2512dc811c38705a Reviewed-on: https://review.whamcloud.com/33473 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index afdfb53..653ab18 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -659,9 +659,10 @@ void print_changelog_rec(struct llog_changelog_rec *rec) secs = __le64_to_cpu(rec->cr.cr_time) >> 30; gmtime_r(&secs, &ts); - printf("changelog record id:0x%x cr_flags:0x%x cr_type:%s(0x%x) " - "date:'%02d:%02d:%02d.%09d %04d.%02d.%02d' target:"DFID, - __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) date:'%02d:%02d:%02d.%09d %04d.%02d.%02d' " + "target:"DFID, __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),