Skip to content

Factor out internal flash cache logic #8961

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy