mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
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:
@@ -26,6 +26,7 @@ public:
|
||||
|
||||
dword id() const { return m_fsid; }
|
||||
static FS* from_fsid(dword);
|
||||
static void sync();
|
||||
|
||||
virtual bool initialize() = 0;
|
||||
virtual const char* class_name() const = 0;
|
||||
@@ -98,11 +99,7 @@ public:
|
||||
void will_be_destroyed();
|
||||
|
||||
protected:
|
||||
Inode(FS& fs, unsigned index)
|
||||
: m_fs(fs)
|
||||
, m_index(index)
|
||||
{
|
||||
}
|
||||
Inode(FS& fs, unsigned index);
|
||||
|
||||
virtual void populate_metadata() const = 0;
|
||||
void set_metadata_dirty(bool b) { m_metadata_dirty = b; }
|
||||
|
||||
Reference in New Issue
Block a user