Fix up cloud log state counting.
[bluesky.git] / bluesky / cache.c
index 3afceca..1f10ca3 100644 (file)
@@ -195,6 +195,8 @@ static void flushd_cloud(BlueSkyFS *fs)
             journal_seq_start);
 
     fs->log->journal_watermark = journal_seq_start;
+
+    bluesky_inode_map_minimize(fs);
 }
 
 /* Drop cached data for a given inode, if it is clean.  inode must be locked. */
@@ -285,6 +287,12 @@ static gpointer flushd_task(BlueSkyFS *fs)
     bluesky_cachefile_gc(fs);
     g_mutex_unlock(fs->flushd_lock);
 
+    g_print("\nCloudlog cache: %d dirty, %d writeback, %d journal, %d cloud\n",
+            g_atomic_int_get(&fs->cache_log_dirty),
+            g_atomic_int_get(&fs->cache_log_writeback),
+            g_atomic_int_get(&fs->cache_log_journal),
+            g_atomic_int_get(&fs->cache_log_cloud));
+
     return NULL;
 }