1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

Ext2FS: Shrink Ext2FSDirectoryEntry from 16 to 12 bytes

The way we read/write directories is very inefficient, and this doesn't
solve any of that. It does however reduce memory usage of directory
entry vectors by 25% which has nice immediate benefits.
This commit is contained in:
Andreas Kling 2021-02-11 22:45:50 +01:00
parent cef73f2010
commit a280cdf9ba
2 changed files with 9 additions and 8 deletions

View file

@ -98,6 +98,8 @@ class Ext2FS final : public BlockBasedFS {
friend class Ext2FSInode;
public:
using InodeIndex = u32;
static NonnullRefPtr<Ext2FS> create(FileDescription&);
virtual ~Ext2FS() override;
@ -117,7 +119,6 @@ public:
private:
typedef unsigned BlockIndex;
typedef unsigned GroupIndex;
typedef unsigned InodeIndex;
explicit Ext2FS(FileDescription&);
const ext2_super_block& super_block() const { return m_super_block; }