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>
16 /* Small test program for BlueSkyFS. Doesn't do much useful. */
18 int main(int argc, char *argv[])
22 printf("BlueSkyFS starting...\n");
24 printf(" time = %lld\n", bluesky_get_current_time());
26 BlueSkyFS *fs = bluesky_new_fs("export");
29 root = bluesky_new_inode(BLUESKY_ROOT_INUM, fs, BLUESKY_DIRECTORY);
32 bluesky_insert_inode(fs, root);
35 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
38 bluesky_insert_inode(fs, file);
39 bluesky_directory_insert(root, "foo", file->inum);
41 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
44 bluesky_insert_inode(fs, file);
45 bluesky_directory_insert(root, "bar", file->inum);
47 file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), fs, BLUESKY_REGULAR);
50 bluesky_insert_inode(fs, file);
51 bluesky_directory_insert(root, "baz", file->inum);
53 bluesky_directory_dump(root);
54 bluesky_directory_lookup(root, "foo");
55 bluesky_directory_lookup(root, "bar");
56 bluesky_directory_lookup(root, "baz");