Whamcloud - gitweb
LU-11567 utils: llog_reader print changelog index 18/34018/4
authorOlaf Faaland <faaland1@llnl.gov>
Wed, 24 Oct 2018 21:23:50 +0000 (14:23 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Jan 2019 06:28:08 +0000 (06:28 +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.

Lustre-change: https://review.whamcloud.com/#/c/33473/
Lustre-commit: 78b0c3ce5a45b4919d53ac6cc886d6a9e713e05d

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@ddn.com>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: I0059cc34b39161462b3eadbb2512dc811c38705a
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34018
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/llog_reader.c

index 769a40a..e676d26 100644 (file)
@@ -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));