Improve the reading back of objects committed to the journal.
[bluesky.git] / bluesky / bluesky-private.h
index ad8dea1..2932417 100644 (file)
@@ -241,8 +241,13 @@ uint32_t crc32c_finalize(uint32_t crc);
 struct _BlueSkyLog {
     char *log_directory;
     GAsyncQueue *queue;
-    int fd;
+    int fd, dirfd;
     int seq_num;
+    GSList *committed;
+
+    /* Cache of log segments which have been memory-mapped. */
+    GMutex *mmap_lock;
+    GHashTable *mmap_cache;
 };
 
 BlueSkyLog *bluesky_log_new(const char *log_directory);