Remove Vnode to let the fs use PageCache for itself

This commit is contained in:
LI Qing
2023-09-13 12:07:58 +08:00
committed by Tate, Hongliang Tian
parent aeea333945
commit 98bf3d4845
30 changed files with 483 additions and 533 deletions

View File

@ -94,7 +94,7 @@ impl FileSystem for DevPts {
}
fn flags(&self) -> FsFlags {
FsFlags::NO_PAGECACHE
FsFlags::empty()
}
}
@ -148,6 +148,16 @@ impl Inode for RootInode {
self.metadata.clone()
}
fn type_(&self) -> InodeType {
self.metadata.type_
}
fn mode(&self) -> InodeMode {
self.metadata.mode
}
fn set_mode(&self, mode: InodeMode) {}
fn atime(&self) -> Duration {
self.metadata.atime
}
@ -160,8 +170,6 @@ impl Inode for RootInode {
fn set_mtime(&self, time: Duration) {}
fn set_mode(&self, mode: InodeMode) {}
fn create(&self, name: &str, type_: InodeType, mode: InodeMode) -> Result<Arc<dyn Inode>> {
Err(Error::new(Errno::EPERM))
}