From 66c63311313a4d8e4e1fc0fc12214610391d9731 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 29 Oct 2020 11:33:28 -0700 Subject: [PATCH] scoutfs-utils: add max item vers to log trees Add a field to the log_trees struct which records the greatest item version seen in items in the tree. Signed-off-by: Zach Brown --- utils/src/format.h | 1 + utils/src/print.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/utils/src/format.h b/utils/src/format.h index d418828b..7be325bc 100644 --- a/utils/src/format.h +++ b/utils/src/format.h @@ -426,6 +426,7 @@ struct scoutfs_log_trees { struct scoutfs_alloc_root data_avail; struct scoutfs_alloc_root data_freed; struct scoutfs_srch_file srch_file; + __le64 max_item_vers; __le64 rid; __le64 nr; }; diff --git a/utils/src/print.c b/utils/src/print.c index 08ad1e4c..280e8456 100644 --- a/utils/src/print.c +++ b/utils/src/print.c @@ -304,6 +304,7 @@ static int print_log_trees_item(struct scoutfs_key *key, void *val, " data_avail: "ALCROOT_F"\n" " data_freed: "ALCROOT_F"\n" " srch_file: "SRF_FMT"\n" + " max_item_vers: %llu\n" " rid: %016llx\n" " nr: %llu\n", AL_HEAD_A(<->meta_avail), @@ -316,6 +317,7 @@ static int print_log_trees_item(struct scoutfs_key *key, void *val, ALCROOT_A(<->data_avail), ALCROOT_A(<->data_freed), SRF_A(<->srch_file), + le64_to_cpu(lt->max_item_vers), le64_to_cpu(lt->rid), le64_to_cpu(lt->nr)); }