log->data = NULL;
bluesky_cloudlog_stats_update(log, 1);
}
- if (log->location_flags & CLOUDLOG_CLOUD) {
- log->location_flags &= ~CLOUDLOG_JOURNAL;
- }
g_mutex_unlock(log->lock);
}
}
{
if (!g_mutex_trylock(fs->flushd_lock))
return NULL;
- flushd_dirty(fs);
- flushd_cloud(fs);
- flushd_clean(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_journal),
g_atomic_int_get(&fs->cache_log_cloud));
+ flushd_dirty(fs);
+ flushd_cloud(fs);
+ flushd_clean(fs);
+ bluesky_cachefile_gc(fs);
+ g_mutex_unlock(fs->flushd_lock);
+
return NULL;
}
item = g_hash_table_lookup(fs->locations, &id);
if (item == NULL) {
item = bluesky_cloudlog_new(fs, &id);
+ bluesky_cloudlog_stats_update(item, 1);
bluesky_cloudlog_insert_locked(item);
} else {
bluesky_cloudlog_ref(item);
/*const BlueSkyCloudPointer *data3
= (const BlueSkyCloudPointer *)(data + len1 + len2);*/
+ bluesky_cloudlog_stats_update(log_item, -1);
bluesky_string_unref(log_item->data);
log_item->data = NULL;
log_item->location_flags = CLOUDLOG_JOURNAL;
+ bluesky_cloudlog_stats_update(log_item, 1);
BlueSkyCloudID id0;
memset(&id0, 0, sizeof(id0));