summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs
index 2df0a10..e0bfa2e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -30,7 +30,7 @@ struct Args {
allow_root: bool,
}
-const TTL: Duration = Duration::from_secs(1);
+const TTL: Duration = Duration::new(0, 0);
const INODE_PER_BLOCK: usize = BLOCK_SIZE / INODE_SIZE;
/// The design of MyFS is rather simple:
@@ -111,17 +111,11 @@ impl AyaFS {
+ inode_bitmap_block_number
+ inode_block_number
+ 1,
- cached_inodes: BlockCache::new(device.clone(), 256),
- cached_blocks: BlockCache::new(device.clone(), 256),
+ cached_inodes: BlockCache::new(device.clone(), 1024),
+ cached_blocks: BlockCache::new(device.clone(), 8192),
};
- fs.create_inode(
- 0o755,
- InodeMode::IFDIR,
- get_current_uid(),
- get_current_gid(),
- 0,
- );
+ fs.create_directory(0o755, get_current_uid(), get_current_gid(), 0);
fs
}