Item seq is max of trans and lock write_seq

Rename the item version to seq and set it to the max of the transaction
seq and the lock's write_seq.  This lets btree item merging chose a seq
at which all dirty items written in future commits must have greater
seqs.  It can drop the seqs from items written to the fs tree during
btree merging knowing that there aren't any older items out in
transactions that could be mistaken for newer items.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2021-06-15 15:25:14 -07:00
parent 3c69861c03
commit 65c39e5f97
6 changed files with 60 additions and 45 deletions
+2 -2
View File
@@ -449,13 +449,13 @@ struct scoutfs_log_trees {
struct scoutfs_srch_file srch_file;
__le64 data_alloc_zone_blocks;
__le64 data_alloc_zones[SCOUTFS_DATA_ALLOC_ZONE_LE64S];
__le64 max_item_vers;
__le64 max_item_seq;
__le64 rid;
__le64 nr;
};
struct scoutfs_log_item_value {
__le64 vers;
__le64 seq;
__u8 flags;
__u8 __pad[7];
__u8 data[];