Currently, when a file grows during a Write operation, the entire byte slice representing the file's data is reallocated and copied. This approach is highly inefficient for large files and impacts write performance.
Refactor the internal data structure to use a block-based allocation strategy instead of a contiguous byte slice.
- File data is stored and managed in fixed-size blocks of 4 KB
Write and Setattr operations append or remove blocks rather than reallocating the entire file buffer
Currently, when a file grows during a
Writeoperation, the entire byte slice representing the file's data is reallocated and copied. This approach is highly inefficient for large files and impacts write performance.Refactor the internal data structure to use a block-based allocation strategy instead of a contiguous byte slice.
WriteandSetattroperations append or remove blocks rather than reallocating the entire file buffer