Repository navigation
Conversation
Owner
|
有冲突哈 |
tthjjg
force-pushed
the
fix/kvdb-sector-status-validation
branch
from
November 16, 2026 15:45
73876ba to
7b07706
Compare
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
修复 #443:当扇区 magic、combined 合法,但 store 或 dirty 为 UNUSED 时,将其判为异常扇区头。
正常初始化先写状态表,再写 magic,因此这种状态组合不应被接受。新增检查沿用现有异常处理流程,不改变 API、存储格式或状态编码。
Related issue
Closes #443
Test closure
tests/fdb_kvdb_tc.cortests/fdb_tsdb_tc.cUTEST_UNIT_RUN(...)list oftestcase()Write granularity covered
FDB_WRITE_GRAN= 1 / 8 / 32 / 64 / 128 / 256Data layout and compatibility
inc/flashdb.hchanged, compatibility impact: N/Adocs/plusdocs/zh-cn/are updated: N/APower-loss semantics
fdb_xxx_deinit->fdb_xxx_initreboot simulation板上测试在 GC 搬迁完成后构造异常镜像,通过软件复位验证恢复。
测试不假设页内物理擦除顺序。