Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加入索引缓存、引入路径抽象crate、重构ramfs #669

Closed
wants to merge 72 commits into from

Conversation

Samuka007
Copy link
Member

历时1月,路径缓存终于稳定了。本pr主要新增以下功能:

  • 路径抽象base_path crate,支持单元测试
  • 特定于文件系统的路径索引缓存
  • 添加用户态文件系统挂载与嵌套挂载及其目录索引的验证
    为支持索引缓存进行了以下更改:
  • 重构RamFS
  • 增加FatFS接口
  • 修改MountFS接口
  • 添加简易的挂载点记录结构(全局)
    目前测试通过,关于文件系统解挂载的功能仍需补充。

@Samuka007
Copy link
Member Author

@dragonosbot review

@dragonosbot dragonosbot added S-等待审查 Status: 等待assignee以及相关方的审查。 and removed S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 labels Apr 6, 2024
@Samuka007 Samuka007 requested a review from fslongjin April 7, 2024 03:54
kernel/src/filesystem/vfs/mount.rs Outdated Show resolved Hide resolved
kernel/src/filesystem/vfs/mount.rs Outdated Show resolved Hide resolved
kernel/src/filesystem/vfs/syscall.rs Show resolved Hide resolved
@fslongjin
Copy link
Member

@dragonosbot author

@dragonosbot dragonosbot added S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 and removed S-等待审查 Status: 等待assignee以及相关方的审查。 labels Apr 7, 2024
@Samuka007
Copy link
Member Author

@dragonosbot review

@dragonosbot dragonosbot added S-等待审查 Status: 等待assignee以及相关方的审查。 and removed S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 labels Apr 7, 2024
kernel/src/filesystem/ramfs/utils.rs Outdated Show resolved Hide resolved
Comment on lines 63 to 66
struct HashTable<H: Hasher + Default> {
_hash_type: PhantomData<H>,
table: Vec<RwLock<VecDeque<Weak<dyn IndexNode>>>>,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们有引入hashbrown这个 no_std 的哈希容器库,这里是有什么特别的需求,要自己实现一个吗

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

锁粒度和实现使用hashbrown的话有点复杂,稍后实现。

kernel/src/filesystem/vfs/dcache.rs Outdated Show resolved Hide resolved
kernel/src/filesystem/vfs/mod.rs Show resolved Hide resolved
@Samuka007 Samuka007 requested review from Chiichen and fslongjin April 8, 2024 05:33
@dragonosbot dragonosbot added the T-driver Relevant to the driver team, which will review and decide on the PR/issue. label Apr 9, 2024
@dragonosbot
Copy link

tty驱动发生了更改,请进行审查

cc @GnoCiYeH

@Samuka007
Copy link
Member Author

先不合并吧,现在在缝全局的dentry cache

@Samuka007 Samuka007 closed this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fs Area: 文件系统 O-x86_64 Target: x86_64 S-等待审查 Status: 等待assignee以及相关方的审查。 T-driver Relevant to the driver team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants