Reworked Inode to have a dirty bit and subclass-implemented flush_metadata().

This way we can defer disk writes as long as we like. There's no automatic
flushing happening just yet.
This commit is contained in:
Andreas Kling 2018-12-19 21:56:45 +01:00
parent d506c857ab
commit 1f44cd9dd9
Notes: sideshowbarker 2024-07-19 16:08:01 +09:00
11 changed files with 82 additions and 58 deletions

View file

@ -170,8 +170,8 @@ bool VFS::mount_root(RetainPtr<FS>&& fileSystem)
m_root_vnode = move(node);
kprintf("VFS: mounted root on %s{%p}\n",
m_root_vnode->fileSystem()->class_name(),
m_root_vnode->fileSystem());
m_root_vnode->fs()->class_name(),
m_root_vnode->fs());
m_mounts.append(move(mount));
return true;
@ -278,7 +278,7 @@ RetainPtr<FileDescriptor> VFS::create(const String& path, InodeIdentifier base,
// FIXME: Do the real thing, not just this fake thing!
(void) path;
(void) base;
m_root_vnode->fileSystem()->create_inode(m_root_vnode->fileSystem()->root_inode(), "empty", 0100644, 0, error);
m_root_vnode->fs()->create_inode(m_root_vnode->fs()->root_inode(), "empty", 0100644, 0, error);
return nullptr;
}