feat: add sync() to vfs

新增sync方法,该方法每次调用,会遍历系统内所有的mount点,调用各个文件系统注册
的sync方法,完成对所有已挂载文件系统的sync操作。

close #I480HV

Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
Change-Id: I57ced9c3f7685a448defd17ae56c842796b5668f
This commit is contained in:
Guangyao Ma
2021-08-31 15:50:00 +08:00
parent de8257bc82
commit f67c4dae51
7 changed files with 29 additions and 27 deletions

View File

@@ -61,6 +61,7 @@ struct MountOps {
int (*Mount)(struct Mount *mount, struct Vnode *vnode, const void *data);
int (*Unmount)(struct Mount *mount, struct Vnode **blkdriver);
int (*Statfs)(struct Mount *mount, struct statfs *sbp);
int (*Sync)(struct Mount *mount);
};
typedef int (*foreach_mountpoint_t)(const char *devpoint,