Kernel/FATFS: Cache the cluster list and don't cache the InodeMetadata

Caching the cluster list allows us to fill the two fields in the
InodeMetadata. While at it, don't cache the metadata as when we
have write support having to keep both InodeMetadata and FATEntry
correct is going to get very annoying.
This commit is contained in:
Undefine
2024-01-16 21:24:45 +01:00
committed by Tim Schumacher
parent d4badfac72
commit 33f00a7efb
4 changed files with 55 additions and 54 deletions

View File

@@ -91,6 +91,11 @@ private:
// Reads the cluster number located at the offset within the table.
u32 cluster_number(KBuffer const& fat_sector, u32 entry_cluster_number, u32 entry_offset) const;
// Returns cluster number value that indicates the end of the chain
// has been reached. Any cluster value >= this value indicates this
// is the last cluster.
u32 end_of_chain_marker() const;
ErrorOr<u32> fat_read(u32 cluster);
ErrorOr<void> fat_write(u32 cluster, u32 value);