Skip to main content

tg_easy_fs/
lib.rs

1//! 一个简单的文件系统实现。
2//!
3//! 本模块提供了一个独立于内核的简易文件系统(EasyFS),
4//! 用于 rCore 教学操作系统。
5//!
6//! 教程阅读建议:
7//!
8//! - 先看 `layout.rs`:理解磁盘布局(superblock/inode/data);
9//! - 再看 `efs.rs`:理解文件系统创建/打开流程;
10//! - 最后看 `vfs.rs`:理解 inode 级别读写与目录操作接口。
11
12#![no_std]
13#![deny(warnings, missing_docs)]
14extern crate alloc;
15mod bitmap;
16mod block_cache;
17mod block_dev;
18mod efs;
19mod file;
20mod layout;
21mod pipe;
22mod vfs;
23/// Use a block size of 512 bytes
24pub const BLOCK_SZ: usize = 512;
25use bitmap::Bitmap;
26use block_cache::{block_cache_sync_all, get_block_cache};
27pub use block_dev::BlockDevice;
28pub use efs::EasyFileSystem;
29pub use file::*;
30use layout::*;
31pub use pipe::{make_pipe, PipeReader, PipeWriter};
32pub use vfs::Inode;