]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-journal/journal-internal.h
Merge pull request #30263 from msizanoen1/fix-onboot-rotate-2
[thirdparty/systemd.git] / src / libsystemd / sd-journal / journal-internal.h
index 85d5d32f9659a34aeb6398ab62af043d1fbcbd24..cddc2316af495ed7a4adf51bd0af12d5224af093 100644 (file)
@@ -12,7 +12,7 @@
 #include "journal-def.h"
 #include "journal-file.h"
 #include "list.h"
-#include "set.h"
+#include "prioq.h"
 
 #define JOURNAL_FILES_MAX 7168u
 
@@ -62,12 +62,18 @@ struct Location {
 };
 
 struct Directory {
+        sd_journal *journal;
         char *path;
         int wd;
         bool is_root;
         unsigned last_seen_generation;
 };
 
+typedef struct NewestByBootId {
+        sd_id128_t boot_id;
+        Prioq *prioq; /* JournalFile objects ordered by monotonic timestamp of last update. */
+} NewestByBootId;
+
 struct sd_journal {
         int toplevel_fd;
 
@@ -78,7 +84,10 @@ struct sd_journal {
         OrderedHashmap *files;
         IteratedCache *files_cache;
         MMapCache *mmap;
-        Hashmap *newest_by_boot_id; /* key: boot_id, value: prioq, ordered by monotonic timestamp of last update */
+
+        /* a bisectable array of NewestByBootId, ordered by boot id. */
+        NewestByBootId *newest_by_boot_id;
+        size_t n_newest_by_boot_id;
 
         Location current_location;
 
@@ -86,6 +95,7 @@ struct sd_journal {
         uint64_t current_field;
 
         Match *level0, *level1, *level2;
+        Set *exclude_syslog_identifiers;
 
         uint64_t origin_id;