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>
15 #include "bluesky-private.h"
17 /* Small test program for BlueSkyFS. Doesn't do much useful. */
19 int main(int argc, char *argv[])
23 printf("BlueSkyFS starting...\n");
25 printf(" time = %"PRIi64"\n", bluesky_get_current_time());
27 BlueSkyFS *fs = bluesky_new_fs("export");
30 root = bluesky_new_inode(BLUESKY_ROOT_INUM, fs, BLUESKY_DIRECTORY);
33 bluesky_insert_inode(fs, root);
36 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
39 bluesky_insert_inode(fs, file);
40 bluesky_directory_insert(root, "foo", file->inum);
42 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
45 bluesky_insert_inode(fs, file);
46 bluesky_directory_insert(root, "bar", file->inum);
48 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
51 bluesky_insert_inode(fs, file);
52 bluesky_directory_insert(root, "baz", file->inum);
54 bluesky_directory_dump(root);
55 bluesky_directory_lookup(root, "foo");
56 bluesky_directory_lookup(root, "bar");
57 bluesky_directory_lookup(root, "baz");