chiark / gitweb /
journal: remove journal_file_object_keep/release functions
[elogind.git] / src / journal / journal-file.h
index 6b4bf0d5aed265b3f55822a3b7031e4744351aab..c5a92bc5ff787a85b8c0f853b0a8bb57e47f17ba 100644 (file)
@@ -76,7 +76,7 @@ typedef struct JournalFile {
         JournalMetrics metrics;
         MMapCache *mmap;
 
-        Hashmap *chain_cache;
+        OrderedHashmap *chain_cache;
 
 #if defined(HAVE_XZ) || defined(HAVE_LZ4)
         void *compress_buffer;
@@ -211,18 +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);
-        uint64_t s = le64toh(o->object.size);
-
-        return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
-                              offset, s, &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);
-        uint64_t s = le64toh(o->object.size);
-
-        return mmap_cache_release(f->mmap, f->fd, f->prot, context, offset, s);
-}