@@ -41,6 +41,8 @@ static struct fuse_opt zdbfs_opts[] = {
4141 {"tn=%s" , zdb_opt_field (temp_ns ), 0 },
4242 {"ts=%s" , zdb_opt_field (temp_pass ), 0 },
4343
44+ {"size=%llu" , zdb_opt_field (size ), 0 },
45+
4446 {"nocache" , zdb_opt_field (nocache ), 0 },
4547 {"autons" , zdb_opt_field (autons ), 0 },
4648 {"background" , zdb_opt_field (background ), 0 },
@@ -83,6 +85,7 @@ int zdbfs_init_args(zdbfs_t *fs, struct fuse_args *args, struct fuse_cmdline_opt
8385 fs -> opts -> background = -1 ;
8486 fs -> opts -> autons = -1 ;
8587 fs -> opts -> cachesize = ZDBFS_BLOCKS_CACHE_LIMIT ;
88+ fs -> opts -> size = 10ull * 1024 * 1024 * 1024 ;
8689
8790 // parsing fuse options
8891 if (fuse_parse_cmdline (args , fopts ) != 0 )
@@ -139,8 +142,10 @@ int zdbfs_init_runtime(zdbfs_t *fs) {
139142 fs -> autons = (fs -> opts -> autons == 0 ) ? 1 : 0 ;
140143 fs -> logfile = fs -> opts -> logfile ;
141144 fs -> cachesize = fs -> opts -> cachesize ;
145+ fs -> fssize = fs -> opts -> size ;
142146
143147 zdbfs_verbose ("[+] blocks cache size: %lu KB\n" , (fs -> cachesize * ZDBFS_BLOCK_SIZE ) / 1024 );
148+ zdbfs_verbose ("[+] virtual filesystem size: %.1f GB\n" , GB (fs -> fssize ));
144149
145150 // initialize cache
146151 if (!(fs -> tmpblock = malloc (ZDBFS_BLOCK_SIZE )))
0 commit comments