This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

fds: pages_init() will not initialize all entries of m_pages[]?

For example, if the first page is erased then it will set this page as swap page and continue looping without increasing the 'page' variable.

  • This means that the last entry of m_pages is left uninitialized.
    • Uninitialized in this case is interpreted as page type FDS_PAGE_DATA, zero bytes used and NULL for page address.
      • write_space_reserve() will use this page.
        • write_execute will send a null pointer to record_header_write_begin which fails with FDS_ERR_BUSY.

I worked around this for the most common case where the erased page is supposed to be a data page and continuing looping for the actual swap page, unless the file system is uninitialized.

The workaround fixes the most common case where the swap page is replaced. This case is quickly encountered by testing with random resets during file system use.

Do you have update code in your repositories that we can try as a proper fix?

/ Ralf

Parents Reply Children
No Data
Related