mtd: SET loses the consolidation error and can report -ENOMEM
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- embedded-iot
调研方向
从 drivers/mtd/mtd_config.c 开始,查看第 730-733 行附近的合并辅助函数及其错误返回值,然后查看第 1000-1003 行、1313 行和 1328 行附近丢弃返回值的 SET 调用点。检查辅助函数的失败哨兵值如何被使用,以及 MTD 的读/写/擦除错误能否回传给调用者。完成的标准是:合并过程中的 I/O 错误能够到达 SET 的调用者,而不是经过重试的搜索最终以 -ENOMEM 结束。
由索引模型根据 Issue 内容生成。
描述
Mechanism. The consolidation helper returns 0 as its failure sentinel. SET ignores that value, retries the free-entry search, and can end up returning -ENOMEM even though the real failure was an I/O error during consolidation.
Effect. The caller sees a misleading -ENOMEM (or an apparently successful retry) instead of the underlying I/O failure, and the diagnostic information from the original error is lost.
Location. drivers/mtd/mtd_config.c:730-733, :1000-1003, :1313, :1328 (master f284e6d7).
Trigger. A consolidation pass during SET hits an MTD write/erase error.
Expected. The original I/O error reaches the caller.
Evidence. Source inspection only: both error returns yield 0, and both call sites discard the return value.
Patch. Return the underlying error from the consolidation helper and propagate it from SET.
- 主要语言
- C
- 星标
- 4.1k
- 派生
- 1.8k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 900
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/nuttx 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
Arch: all Arch: arm Area: Build system OS: Linux Type: Bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
Document the isv:HDFGroup Linux package repositories and signing key可能已有人在做 @brtnfld 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug status: planned
难度 2/5 1-3 小时 新手友好度 78/100
ChupathingyCE/chupathingyce#1834 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复