Kernel: Changed stat values from func to be field
- Removed virtual functions for all of the stat stuff. This did however introduce some issues, mainly with /proc becoming out of sync if you changed your ID. I propose we do the linux thing and just have a stat update function which is optional, but allows dynamic updates of stat fields for cases such as those in uid/gid in /proc. - Simplified the API, although still kind of annoying it is a bit simpler. - Moved some of the FS structure from having the FS inode inside the in memory inode to a Serialise <-> Deserialise model where Inodes are deserialised from disk into in memory ones and then back into on disk ones when it comes time for syncing. This makes it semantically better in my opinion, as it explicitly separates disk and non-disk functionality.
This commit is contained in:
@@ -20,7 +20,6 @@ namespace Kernel
|
||||
|
||||
NVMeQueue& io_queue() { return *m_io_queue; }
|
||||
|
||||
virtual dev_t rdev() const override { return m_rdev; }
|
||||
virtual BAN::StringView name() const override { return m_name; }
|
||||
|
||||
protected:
|
||||
@@ -51,7 +50,6 @@ namespace Kernel
|
||||
BAN::Vector<BAN::RefPtr<NVMeNamespace>> m_namespaces;
|
||||
|
||||
char m_name[20];
|
||||
const dev_t m_rdev;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace Kernel
|
||||
virtual uint32_t sector_size() const override { return m_block_size; }
|
||||
virtual uint64_t total_size() const override { return m_block_size * m_block_count; }
|
||||
|
||||
virtual dev_t rdev() const override { return m_rdev; }
|
||||
virtual BAN::StringView name() const override { return m_name; }
|
||||
|
||||
private:
|
||||
@@ -35,7 +34,6 @@ namespace Kernel
|
||||
const uint64_t m_block_count;
|
||||
|
||||
char m_name[10] {};
|
||||
const dev_t m_rdev;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user