Skip to content

Rejected NAND geometries too small for metadata rebuilds - #100

Draft
fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:feature/nand-metadata-geometry
Draft

fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:feature/nand-metadata-geometry

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

Fixes #81

A NAND geometry with too few pages can format successfully, then enter another metadata allocation while rebuilding a snapshot later.

Format and open now reject geometries unless the snapshot, a block-link page, and one later update fit in one block. The check returns LX_NOT_SUPPORTED before LevelX flash I/O. The host test uses printf and exit to report to CTest; these are test-only exceptions to MISRA C:2004 Rules 20.9 and 20.11 and MISRA C:2012/2023 Rules 21.6 and 21.8. The capacity check does not address the existing open-path rejection of partially filled final metadata-table pages. @rahmanih, please review this approach; I am happy to change it if you disagree.

GCC 14 CMake/Ninja: 4/4 focused configurations and the existing NAND regression passed. New validation lines and branches: 14/14 each. No hardware test.

Fixes eclipse-threadx#81

A NAND geometry with too few pages can format successfully, then enter another
metadata allocation while rebuilding a snapshot later.

Format and open now reject geometries unless the snapshot, a block-link page,
and one later update fit in one block. The check returns LX_NOT_SUPPORTED before
LevelX flash I/O. The host test uses printf and exit to report to CTest; these
are test-only exceptions to MISRA C:2004 Rules 20.9 and 20.11 and
MISRA C:2012/2023 Rules 21.6 and 21.8.

GCC 14 CMake/Ninja: 4/4 focused configurations and the existing NAND regression
passed. New validation lines and branches: 14/14 each. No hardware test.

Assisted-by: Codex (GPT-6-Sol) <noreply@openai.com>
@fdesbiens
fdesbiens requested a review from rahmanih September 30, 2026 20:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant