X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky.h;h=54e8450186139cfe37cb062a7b078d06f33e36fb;hb=a82b60b3b683840a7074110831bcbaa16a40f0eb;hp=820fa123fc5c0c4f295439a6be6cc0804339e3c4;hpb=83fd6b61a6e092a22d4d5e59ed95f05f5e287f11;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index 820fa12..54e8450 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -33,6 +33,9 @@ typedef struct { /* Should frontends handle requests serially or allow operations to proceed * in parallel? */ int sync_frontends; + + /* Target size of the disk cache at the proxy, in kilobytes. */ + int cache_size; } BlueSkyOptions; extern BlueSkyOptions bluesky_options; @@ -63,19 +66,19 @@ void bluesky_init(void); gchar *bluesky_lowercase(const gchar *s); -struct _BlueSkyMmap; -typedef struct _BlueSkyMmap BlueSkyMmap; +struct _BlueSkyCacheFile; +typedef struct _BlueSkyCacheFile BlueSkyCacheFile; typedef struct { gint refcount; - BlueSkyMmap *mmap; + BlueSkyCacheFile *mmap; gchar *data; gsize len; } BlueSkyRCStr; BlueSkyRCStr *bluesky_string_new(gpointer data, gsize len); BlueSkyRCStr *bluesky_string_new_from_gstring(GString *s); -BlueSkyRCStr *bluesky_string_new_from_mmap(BlueSkyMmap *mmap, +BlueSkyRCStr *bluesky_string_new_from_mmap(BlueSkyCacheFile *mmap, int offset, gsize len); void bluesky_string_ref(BlueSkyRCStr *string); void bluesky_string_unref(BlueSkyRCStr *string); @@ -175,6 +178,10 @@ typedef struct { /* Mapping of object identifiers (blocks, inodes) to physical location (in * the local cache or in the logs in the cloud). */ GHashTable *locations; + + /* The inode map, which maps inode numbers to the location of the most + * recent version. */ + GSequence *inode_map; } BlueSkyFS; /* Inode number of the root directory. */