diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-06-24 23:35:56 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-25 15:49:04 +0200 |
commit | df66c28479e9206adeef1f40f8c0e448c8aea77e (patch) | |
tree | 8f9c8e5d764847e0acabf3a266ace76d7ca9bc1a /Kernel/FileSystem/InodeIdentifier.h | |
parent | c689be0dbc702f3187029deee58ac9e5cf749372 (diff) | |
download | serenity-df66c28479e9206adeef1f40f8c0e448c8aea77e.zip |
Kernel: Deemphasize inode identifiers
These APIs were clearly modeled after Ext2FS internals, and make perfect sense
in Ext2FS context. The new APIs are more generic, and map better to the
semantics exported to the userspace, where inode identifiers only appear in
stat() and readdir() output, but never in any input.
This will also hopefully reduce the potential for races (see commit https://github.com/SerenityOS/serenity/commit/c44b4d61f350703fcf1bbd8f6e353b9c6c4210c2).
Lastly, this makes it way more viable to implement a filesystem that only
synthesizes its inodes lazily when queried, and destroys them when they are no
longer in use. With inode identifiers being used to reference inodes, the only
choice for such a filesystem is to persist any inode it has given out the
identifier for, because it might be queried at any later time. With direct
references to inodes, the filesystem will know when the last reference is
dropped and the inode can be safely destroyed.
Diffstat (limited to 'Kernel/FileSystem/InodeIdentifier.h')
-rw-r--r-- | Kernel/FileSystem/InodeIdentifier.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/FileSystem/InodeIdentifier.h b/Kernel/FileSystem/InodeIdentifier.h index 7152fca956..544e0faebd 100644 --- a/Kernel/FileSystem/InodeIdentifier.h +++ b/Kernel/FileSystem/InodeIdentifier.h @@ -62,8 +62,6 @@ public: return m_fsid != other.m_fsid || m_index != other.m_index; } - bool is_root_inode() const; - String to_string() const { return String::format("%u:%u", m_fsid, m_index); } private: |