summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-01-31 19:20:27 +0100
committerLennart Poettering <lennart@poettering.net>2023-03-02 10:03:15 +0100
commit206f0f397edf1144c63a158fb30f496c3e89f256 (patch)
treed16777bd74b799acc0440efdf15cfe70869b8f47 /docs
parent7a67afe33192ce4a55e6825b80554fb4ebbb4b03 (diff)
downloadsystemd-206f0f397edf1144c63a158fb30f496c3e89f256.tar.gz
journal-file: journal-file: extend journal header to always carry offset of most recent entry
This way we can quickly find the most recent entry, without searching or traversing entry array chains. This is relevant later, as it it allows us to quickly determine the most recent timestamps of each journal file, in a roughly atomic way.
Diffstat (limited to 'docs')
-rw-r--r--docs/JOURNAL_FILE_FORMAT.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/JOURNAL_FILE_FORMAT.md b/docs/JOURNAL_FILE_FORMAT.md
index 712f3bce36..ede9d923a4 100644
--- a/docs/JOURNAL_FILE_FORMAT.md
+++ b/docs/JOURNAL_FILE_FORMAT.md
@@ -178,8 +178,10 @@ _packed_ struct Header {
le64_t data_hash_chain_depth;
le64_t field_hash_chain_depth;
/* Added in 252 */
- le32_t tail_entry_array_offset; \
- le32_t tail_entry_array_n_entries; \
+ le32_t tail_entry_array_offset;
+ le32_t tail_entry_array_n_entries;
+ /* Added in 254 */
+ le64_t tail_entry_offset;
};
```
@@ -252,6 +254,9 @@ field hash table, minus one.
**tail_entry_array_offset** and **tail_entry_array_n_entries** allow immediate
access to the last entry array in the global entry array chain.
+**tail_entry_offset** allow immediate access to the last entry in the journal
+file.
+
## Extensibility
The format is supposed to be extensible in order to enable future additions of