Kernel: Make FS::block_size a size_t

This commit is contained in:
Sergey Bugaev 2020-05-18 21:46:47 +03:00 committed by Andreas Kling
parent 9cbdd5f01e
commit de4b7d9c21
Notes: sideshowbarker 2024-07-19 06:28:51 +09:00
3 changed files with 5 additions and 5 deletions

View file

@ -107,7 +107,7 @@ void FS::lock_all()
}
}
void FS::set_block_size(int block_size)
void FS::set_block_size(size_t block_size)
{
ASSERT(block_size > 0);
if (block_size == m_block_size)

View file

@ -85,20 +85,20 @@ public:
virtual void flush_writes() {}
int block_size() const { return m_block_size; }
size_t block_size() const { return m_block_size; }
virtual bool is_file_backed() const { return false; }
protected:
FS();
void set_block_size(int);
void set_block_size(size_t);
mutable Lock m_lock { "FS" };
private:
unsigned m_fsid { 0 };
int m_block_size { 0 };
size_t m_block_size { 0 };
bool m_readonly { false };
};

View file

@ -742,7 +742,7 @@ Optional<KBuffer> procfs$df(InodeIdentifier)
fs_object.add("total_inode_count", fs.total_inode_count());
fs_object.add("free_inode_count", fs.free_inode_count());
fs_object.add("mount_point", mount.absolute_path());
fs_object.add("block_size", fs.block_size());
fs_object.add("block_size", static_cast<u64>(fs.block_size()));
fs_object.add("readonly", fs.is_readonly());
fs_object.add("mount_flags", mount.flags());