X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky-private.h;h=5080e00e8f736db949cf972a0f2fd122e889b474;hb=966a43ffed492d387e0d75e56c3984d9001c15b1;hp=4609226e388f2326db0e7c6d57deadca323fbf84;hpb=349ac2f2bcc67551a5bb946c73c650501228f056;p=bluesky.git diff --git a/bluesky/bluesky-private.h b/bluesky/bluesky-private.h index 4609226..5080e00 100644 --- a/bluesky/bluesky-private.h +++ b/bluesky/bluesky-private.h @@ -19,9 +19,27 @@ extern "C" { #endif +extern int bluesky_verbose; + +/* 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); @@ -47,7 +65,8 @@ typedef enum { } BlueSkyAsyncStatus; struct BlueSkyNotifierList; -typedef struct { +typedef struct _BlueSkyStoreAsync BlueSkyStoreAsync; +struct _BlueSkyStoreAsync { BlueSkyStore *store; GMutex *lock; @@ -63,11 +82,18 @@ typedef struct { int result; /* Result code; 0 for success. */ struct BlueSkyNotifierList *notifiers; + gint notifier_count; + + /* The barrier waiting on this operation. Support for more than one + * barrier for a single async is not well-supported and should be avoided + * if possible. */ + 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 */ -} BlueSkyStoreAsync; +}; /* Support for notification lists. These are lists of one-shot functions which * can be called when certain events--primarily, competed storage