X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky.h;h=099aad4bb9ed39056cf11b3fb4e74cac7b20fcaa;hb=4a207da5eef9f87a702a011d003d5ad17b651085;hp=e9e40d81686818b8c4dba4fa7ed93651ae10a34f;hpb=3380ff6d419c7d1370c95cf476520ed5398e5b6d;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index e9e40d8..099aad4 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -143,10 +143,19 @@ typedef struct { BlueSkyCloudLogState *log_state; /* Accounting for memory used for caches. Space is measured in blocks, not - * bytes. We track both total data in the caches and dirty data (total - * data includes dirty data). Updates to these variables must be made - * atomically. */ - gint cache_total, cache_dirty; + * bytes. Updates to these variables must be made atomically. */ + gint cache_dirty; + + /* Like above, but tracking data stored in the cloudlog entries + * specifically: + * - cache_log_dirty: data uncommitted to journal and cloud + * - cache_log_writeback: data being written to journal + * - cache_log_journal: data committed to journal + * - cache_log_cloud: data written to cloud as well + * Log entries should progress from the top state to the bottom, and are + * only ever counted in one category at a time. */ + gint cache_log_dirty, cache_log_writeback, + cache_log_journal, cache_log_cloud; /* Linked list of inodes, sorted by access/modification times for cache * management. Editing these lists is protected by the filesystem lock; to