Rework cache flushing logic--this version should work much better.
[bluesky.git] / bluesky / bluesky-private.h
index 852b04e..ba9df02 100644 (file)
 extern "C" {
 #endif
 
+/* Target cache size levels. */
+extern int bluesky_watermark_low_dirty;
+extern int bluesky_watermark_medium_dirty;
+extern int bluesky_watermark_high_dirty;
+
+extern int bluesky_watermark_low_total;
+extern int bluesky_watermark_medium_total;
+extern int bluesky_watermark_high_total;
+
 /* TODO: Make this go away entirely. */
 BlueSkyFS *bluesky_new_fs(gchar *name);
 
+/* Linked list update functions for LRU lists. */
+void bluesky_list_unlink(GList *head, GList *item);
+GList *bluesky_list_prepend(GList *head, BlueSkyInode *inode);
+GList *bluesky_list_append(GList *head, BlueSkyInode *inode);
+BlueSkyInode *bluesky_list_head(GList *head);
+BlueSkyInode *bluesky_list_tail(GList *head);
+
 /* Serialization and deserialization of filesystem data for storing to
  * persistent storage. */
 void bluesky_serialize_superblock(GString *out, BlueSkyFS *fs);
@@ -72,6 +88,7 @@ struct _BlueSkyStoreAsync {
     BlueSkyStoreAsync *barrier;
 
     bluesky_time_hires start_time;  /* Time operation was submitted. */
+    bluesky_time_hires exec_time;   /* Time processing started on operation. */
 
     gpointer store_private;     /* For use by the storage implementation */
 };