Fix up cloud log state counting.
[bluesky.git] / bluesky / log.c
index e5f0321..f52ac01 100644 (file)
@@ -310,6 +310,7 @@ BlueSkyCloudLog *bluesky_log_get_commit_point(BlueSkyFS *fs)
     BlueSkyCloudLog *marker = bluesky_cloudlog_new(fs, NULL);
     marker->type = LOGTYPE_JOURNAL_MARKER;
     marker->data = bluesky_string_new(g_strdup(""), 0);
+    bluesky_cloudlog_stats_update(marker, 1);
     bluesky_cloudlog_sync(marker);
 
     g_mutex_lock(marker->lock);
@@ -332,6 +333,7 @@ void bluesky_log_write_commit_point(BlueSkyFS *fs, BlueSkyCloudLog *marker)
     g_string_append_len(loc, (const gchar *)&seq, sizeof(seq));
     g_string_append_len(loc, (const gchar *)&offset, sizeof(offset));
     commit->data = bluesky_string_new_from_gstring(loc);
+    bluesky_cloudlog_stats_update(commit, 1);
     bluesky_cloudlog_sync(commit);
 
     g_mutex_lock(commit->lock);