Optimize lock usage in ext2 inodes

This commit is contained in:
Shaowei Song
2024-12-19 14:42:10 +00:00
committed by Tate, Hongliang Tian
parent 3d12ccdbea
commit 21da6d2b93
2 changed files with 421 additions and 389 deletions

View File

@ -29,22 +29,7 @@ impl Inode for Ext2Inode {
} }
fn metadata(&self) -> Metadata { fn metadata(&self) -> Metadata {
Metadata { self.metadata()
dev: 0, // TODO: ID of block device
ino: self.ino() as _,
size: self.file_size() as _,
blk_size: self.fs().super_block().block_size(),
blocks: self.blocks_count() as _,
atime: self.atime(),
mtime: self.mtime(),
ctime: self.ctime(),
type_: self.inode_type(),
mode: InodeMode::from(self.file_perm()),
nlinks: self.hard_links() as _,
uid: Uid::new(self.uid()),
gid: Gid::new(self.gid()),
rdev: self.device_id(),
}
} }
fn atime(&self) -> Duration { fn atime(&self) -> Duration {

File diff suppressed because it is too large Load Diff