Skip to content

Factor out internal flash cache logic #8961

Open
@tannewt

Description

@tannewt

In #8952 (comment) it was pointed out that this code looked funny:

if (_cache_lba != block_address) {
supervisor_flash_read_blocks(_cache, sector_offset / FILESYSTEM_BLOCK_SIZE, blocks_per_sector);
_cache_lba = sector_offset;
}

Specifically the value _cache_lba is set to sector_offset doesn't match the comparison value block_address. This likely causes excess sector reads when writing to the file system. I think the data written is still write. The cache just doesn't work right.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions