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
commit a280cdf9ba
Notes: sideshowbarker 2024-07-18 22:25:24 +09:00
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; }