From 76ac602c3d79bb39c133c81a38425a77bc0b8b1f Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Sat, 25 Nov 2023 02:13:22 -0800 Subject: Some FUSE callbacks, some POSIX interface implementation --- src/main.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/main.rs') 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 } -- cgit v1.2.3-70-g09d2