void bluesky_file_write(BlueSkyInode *inode, uint64_t offset,
const char *data, gint len)
{
- g_print("Start write: %ld\n", bluesky_now_hires());
g_return_if_fail(inode->type == BLUESKY_REGULAR);
g_return_if_fail(offset < inode->size);
g_return_if_fail(len <= inode->size - offset);
bluesky_inode_update_ctime(inode, 1);
bluesky_inode_flush(inode->fs, inode);
- g_print("End write: %ld\n", bluesky_now_hires());
}
void bluesky_file_read(BlueSkyInode *inode, uint64_t offset,
if (block->type != BLUESKY_BLOCK_REF)
return;
- g_print("Fetching block from %s\n", block->ref);
BlueSkyRCStr *string = bluesky_store_get(fs->store, block->ref);
bluesky_string_unref(block->data);
g_checksum_update(csum, data->data, data->len);
gchar *name = g_strdup(g_checksum_get_string(csum));
- g_print("Flushing block as %s\n", name);
bluesky_store_put(fs->store, name, data);
g_free(block->ref);
block->ref = name;
BlueSkyInode *inode = bluesky_deserialize_inode(fs, data->data);
if (inode != NULL) {
bluesky_insert_inode(fs, inode);
- g_print("Loaded inode %"PRIu64"\n", inum);
}
}