Rm spin::Mutex except for easy-fs & add new test huge_write & flush cache to disk after a write transaction

This commit is contained in:
Yifan Wu 2021-07-21 19:10:04 +08:00
parent 569e2fe2fe
commit b8a14182cd
36 changed files with 339 additions and 229 deletions

View file

@ -56,13 +56,13 @@ fn easy_fs_pack() -> std::io::Result<()> {
.write(true)
.create(true)
.open(format!("{}{}", target_path, "fs.img"))?;
f.set_len(8192 * 512).unwrap();
f.set_len(128 * 2048 * 512).unwrap();
f
})));
// 4MiB, at most 4095 files
// 128MiB, at most 4095 files
let efs = EasyFileSystem::create(
block_file.clone(),
8192,
128 * 2048,
1,
);
let root_inode = Arc::new(EasyFileSystem::root_inode(&efs));
@ -165,4 +165,4 @@ fn efs_test() -> std::io::Result<()> {
random_str_test(2000 * BLOCK_SZ);
Ok(())
}
}