Add support for the sync and fsync syscall

This commit is contained in:
LI Qing
2023-11-27 15:44:29 +08:00
committed by Tate, Hongliang Tian
parent 9473889c6b
commit 5bc1312a91
5 changed files with 62 additions and 0 deletions

View File

@ -383,6 +383,11 @@ impl Dentry {
self.inode.fs()
}
/// Flushes all changes made to data and metadata to the device.
pub fn sync(&self) -> Result<()> {
self.inode.sync()
}
/// Get the inode metadata
pub fn inode_metadata(&self) -> Metadata {
self.inode.metadata()