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 <zab@versity.com>
This commit is contained in:
Zach Brown
2020-10-29 11:33:28 -07:00
committed by Zach Brown
parent 42bf0980b6
commit 66c6331131
2 changed files with 3 additions and 0 deletions

View File

@@ -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;
};

View File

@@ -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(&lt->meta_avail),
@@ -316,6 +317,7 @@ static int print_log_trees_item(struct scoutfs_key *key, void *val,
ALCROOT_A(&lt->data_avail),
ALCROOT_A(&lt->data_freed),
SRF_A(&lt->srch_file),
le64_to_cpu(lt->max_item_vers),
le64_to_cpu(lt->rid),
le64_to_cpu(lt->nr));
}