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

Ext2FS: The max current block count of a file is size/block_size

Turns out that i_blocks does not take block list holes into account.
This commit is contained in:
Andreas Kling 2020-02-21 19:07:23 +01:00
parent b298c01e92
commit b6887bd9cd
2 changed files with 7 additions and 5 deletions

View file

@ -139,6 +139,7 @@ private:
GroupIndex group_index_from_inode(InodeIndex) const;
GroupIndex group_index_from_block_index(BlockIndex) const;
Vector<BlockIndex> block_list_for_inode_impl(const ext2_inode&, bool include_block_list_blocks = false) const;
Vector<BlockIndex> block_list_for_inode(const ext2_inode&, bool include_block_list_blocks = false) const;
bool write_block_list_for_inode(InodeIndex, ext2_inode&, const Vector<BlockIndex>&);