bluesky_serialize_superblock(buf, fs);
BlueSkyRCStr *data = bluesky_string_new_from_gstring(buf);
- g_print("Syncing superblock...\n");
-
BlueSkyStoreAsync *async = bluesky_store_async_new(fs->store);
async->op = STORE_OP_PUT;
async->key = g_strdup("superblock");
static S3Status s3store_properties_callback(const S3ResponseProperties *properties,
void *callbackData)
{
- g_print("(Properties callback)\n");
return S3StatusOK;
}
BlueSkyStoreAsync *async = (BlueSkyStoreAsync *)a;
S3Store *store = (S3Store *)s;
- g_print("Start task [key=%s]...\n", async->key);
async->status = ASYNC_RUNNING;
if (async->op == STORE_OP_GET) {
handler.responseHandler.completeCallback = s3store_response_callback;
handler.getObjectDataCallback = s3store_get_handler;
- g_print("Starting fetch of %s from S3...\n", async->key);
S3_get_object(&store->bucket, async->key, NULL, 0, 0, NULL,
&handler, &info);
handler.responseHandler.completeCallback = s3store_response_callback;
handler.putObjectDataCallback = s3store_put_handler;
- g_print("Starting store of %s to S3 at %ld...\n",
- async->key, bluesky_now_hires());
S3_put_object(&store->bucket, async->key, encrypted->len, NULL, NULL,
&handler, &info);
async->result = 0;
}
- g_print("Finish task...\n");
bluesky_store_async_mark_complete(async);
bluesky_store_async_unref(async);
}
g_free(async);
g_log("bluesky/store", G_LOG_LEVEL_DEBUG,
"freeing async");
- g_print("Freed async\n");
}
}
}
}
-static void test_notifier(gpointer a, gpointer u)
-{
- g_print("Notifier called!\n");
-}
-
void bluesky_store_async_submit(BlueSkyStoreAsync *async)
{
BlueSkyStore *store = async->store;
async->store->pending++;
g_mutex_unlock(async->store->lock);
- bluesky_store_async_add_notifier(async, test_notifier, NULL);
store->impl->submit(store->handle, async);
if (bluesky_options.synchronous_stores)