Kernel: Tweak FileBackedFS API to avoid intermediary copies

read_block() and write_block() now accept the count (how many bytes to read
or write) and offset (where in the block to start; defaults to 0). Using these
new APIs, we can avoid doing copies between intermediary buffers in a lot more
cases. Hopefully this improves performance or something.
This commit is contained in:
Sergey Bugaev 2020-05-18 21:55:08 +03:00 committed by Andreas Kling
commit 88e23113ae
Notes: sideshowbarker 2024-07-19 06:28:47 +09:00
4 changed files with 68 additions and 85 deletions

View file

@ -123,7 +123,7 @@ private:
unsigned inode_size() const;
bool write_ext2_inode(InodeIndex, const ext2_inode&);
bool read_block_containing_inode(InodeIndex inode, BlockIndex& block_index, unsigned& offset, u8* buffer) const;
bool find_block_containing_inode(InodeIndex inode, BlockIndex& block_index, unsigned& offset) const;
bool flush_super_block();