chiark / gitweb /
journal: remove journal_file_object_keep/release functions
[elogind.git] / src / journal / journal-file.h
index 3d416820b0ac9a0d92bf55b51c4b2b4fe2ae4a0b..c5a92bc5ff787a85b8c0f853b0a8bb57e47f17ba 100644 (file)
@@ -76,9 +76,9 @@ typedef struct JournalFile {
         JournalMetrics metrics;
         MMapCache *mmap;
 
-        Hashmap *chain_cache;
+        OrderedHashmap *chain_cache;
 
-#ifdef HAVE_XZ
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
         void *compress_buffer;
         size_t compress_buffer_size;
 #endif
@@ -211,17 +211,3 @@ static unsigned type_to_context(int type) {
         /* One context for each type, plus one catch-all for the rest */
         return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0;
 }
-
-static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) {
-        unsigned context = type_to_context(o->object.type);
-
-        return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
-                              offset, o->object.size, &f->last_stat, NULL);
-}
-
-static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) {
-        unsigned context = type_to_context(o->object.type);
-
-        return mmap_cache_release(f->mmap, f->fd, f->prot, context,
-                                  offset, o->object.size);
-}