mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Optimize lock usage in ext2 inodes
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
3d12ccdbea
commit
21da6d2b93
@ -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
Reference in New Issue
Block a user