Whamcloud - gitweb
LU-11567 utils: llog_reader print changelog index 73/33473/8
authorOlaf Faaland <faaland1@llnl.gov>
Wed, 24 Oct 2018 21:23:50 +0000 (14:23 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Nov 2018 04:57:48 +0000 (04:57 +0000)
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 <faaland1@llnl.gov>
Change-Id: I0059cc34b39161462b3eadbb2512dc811c38705a
Reviewed-on: https://review.whamcloud.com/33473
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/llog_reader.c

index afdfb53..653ab18 100644 (file)
@@ -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),