+} BlueSkyDirent;
+
+/* File data is divided into fixed-size blocks (except the last block which may
+ * be short?). These blocks are backed by storage in a key/value store, but
+ * may also be dirty if modifications have been made in-memory that have not
+ * been committed. */
+#define BLUESKY_BLOCK_SIZE 32768ULL
+#define BLUESKY_MAX_FILE_SIZE (BLUESKY_BLOCK_SIZE << 24)
+typedef enum {
+ BLUESKY_BLOCK_ZERO = 0, /* Data is all zeroes, not explicitly stored */
+ BLUESKY_BLOCK_REF = 1, /* Reference to key/value store, not cached */
+ BLUESKY_BLOCK_CACHED = 2, /* Data is cached in memory, clean */
+ BLUESKY_BLOCK_DIRTY = 3, /* Data needs to be committed to store */
+} BlueSkyBlockType;
+
+typedef struct {
+ BlueSkyBlockType type;
+ gchar *ref; /* Name of data block in the backing store */
+ gchar *data; /* Pointer to data in memory */
+} BlueSkyBlock;