1 /* Blue Sky: File Systems in the Cloud
3 * Copyright (C) 2009 The Regents of the University of California
4 * Written by Michael Vrable <mvrable@cs.ucsd.edu>
14 #include "bluesky-private.h"
16 BlueSkyOptions bluesky_options;
18 /* Maximum number of threads to use in any particular thread pool, or -1 for no
20 int bluesky_max_threads = 16;
22 /* Environment variables that can be used to initialize settings. */
27 {"BLUESKY_OPT_SYNC_STORES", &bluesky_options.synchronous_stores},
28 {"BLUESKY_OPT_WRITETHROUGH", &bluesky_options.writethrough_cache},
29 {"BLUESKY_OPT_SYNC_INODE_FETCH", &bluesky_options.sync_inode_fetches},
30 {"BLUESKY_OPT_SYNC_FRONTENDS", &bluesky_options.sync_frontends},
34 /* BlueSky library initialization. */
36 void bluesky_store_init_s3(void);
37 void bluesky_store_init_kv(void);
39 /* Initialize the BlueSky library and dependent libraries. */
40 void bluesky_init(void)
45 for (int i = 0; option_table[i].env != NULL; i++) {
46 const char *val = getenv(option_table[i].env);
49 g_print("Option %s set to %d\n", option_table[i].env, v);
50 *option_table[i].option = atoi(val);
55 bluesky_store_init_kv();
56 bluesky_store_init_s3();