+static void cloud_flush_background(SerializedRecord *record)
+{
+ bluesky_cloudlog_encrypt(record->raw_data, record->fs->keys);
+ record->data = bluesky_string_new_from_gstring(record->raw_data);
+ record->raw_data = NULL;
+
+ BlueSkyStoreAsync *async = bluesky_store_async_new(record->fs->store);
+ async->op = STORE_OP_PUT;
+ async->key = record->key;
+ async->data = record->data;
+ bluesky_string_ref(record->data);
+ bluesky_store_async_submit(async);
+ bluesky_store_async_add_notifier(async,
+ (GFunc)cloudlog_flush_complete,
+ record);
+ bluesky_store_async_unref(async);
+}
+