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

Kernel: Expose FileSystem's fragment size

This commit will add a fragment_size() function similar to the
block_size() function.
This commit is contained in:
Justin 2021-05-18 21:04:52 +02:00 committed by Andreas Kling
parent 145e246a5e
commit 721a867c65
3 changed files with 12 additions and 0 deletions

View file

@ -61,6 +61,7 @@ public:
virtual void flush_writes() { }
size_t block_size() const { return m_block_size; }
size_t fragment_size() const { return m_fragment_size; }
virtual bool is_file_backed() const { return false; }
@ -71,12 +72,14 @@ protected:
FS();
void set_block_size(size_t);
void set_fragment_size(size_t);
mutable Lock m_lock { "FS" };
private:
unsigned m_fsid { 0 };
size_t m_block_size { 0 };
size_t m_fragment_size { 0 };
bool m_readonly { false };
};