#include <stdint.h>
#include <glib.h>
+/* Reference-counted blocks of memory, used for passing data in and out of
+ * storage backends and in other places. */
+typedef struct {
+ gint refcount;
+ gpointer data;
+ gsize len;
+} BlueSkyRCStr;
+
+BlueSkyRCStr *bluesky_string_new(gpointer data, gsize len);
+void bluesky_string_ref(BlueSkyRCStr *string);
+void bluesky_string_unref(BlueSkyRCStr *string);
+BlueSkyRCStr *bluesky_string_dup(BlueSkyRCStr *string);
+
/* File types. The numeric values are chosen to match with those used in
* NFSv3. */
typedef enum {
void bluesky_directory_dump(BlueSkyInode *dir);
void bluesky_block_touch(BlueSkyInode *inode, uint64_t i);
+void bluesky_block_flush(BlueSkyBlock *block);
void bluesky_file_truncate(BlueSkyInode *inode, uint64_t size);
void bluesky_file_write(BlueSkyInode *inode, uint64_t offset,
const char *data, gint len);