Add sync() syscall and a /bin/sync.

It walks all the live Inode objects and flushes pending metadata changes
wherever needed.

This could be optimized by keeping a separate list of dirty Inodes,
but let's not get ahead of ourselves.
This commit is contained in:
Andreas Kling 2018-12-20 00:39:29 +01:00
commit ed7ae6c02c
Notes: sideshowbarker 2024-07-19 16:07:56 +09:00
14 changed files with 78 additions and 24 deletions

8
Userland/sync.cpp Normal file
View file

@ -0,0 +1,8 @@
#include <stdio.h>
#include <unistd.h>
int main(int, char**)
{
sync();
return 0;
}