FTL诊断:探针窗口前移至f_mount前+页内容指纹(定位挂载期坏读来源)
This commit is contained in:
@@ -105,8 +105,14 @@ static int ftl_read_page(dhara_sector_t lpn) {
|
||||
s_cached_lpn = lpn;
|
||||
s_cache_dirty = 0;
|
||||
if (s_tree_probe_log) {
|
||||
DBG_INFO("ftl read LPN=%lu (binding see nand read lines)",
|
||||
(unsigned long)lpn);
|
||||
/* 内容指纹:前 8 字节(BPB=33 52 / FAT32=F8 FF.. / 擦除=FF FF..)
|
||||
* 半新半旧混合页在此直接现形 */
|
||||
DBG_INFO("ftl t %lu read LPN=%lu: %02X %02X %02X %02X %02X %02X %02X %02X",
|
||||
(unsigned long)HAL_GetTick(), (unsigned long)lpn,
|
||||
(unsigned int)s_cache_buf[0], (unsigned int)s_cache_buf[1],
|
||||
(unsigned int)s_cache_buf[2], (unsigned int)s_cache_buf[3],
|
||||
(unsigned int)s_cache_buf[4], (unsigned int)s_cache_buf[5],
|
||||
(unsigned int)s_cache_buf[6], (unsigned int)s_cache_buf[7]);
|
||||
}
|
||||
return GD5F_OK;
|
||||
}
|
||||
|
||||
@@ -226,8 +226,10 @@ void StartDefaultTask(void *argument)
|
||||
* (/config.ini 丢失 → 配置引擎首启路径回落工厂默认并自动重建模板)——
|
||||
* 仅当卷已不可用时触发,可用设备 > 一份配置文件。 */
|
||||
static FATFS default_fatfs;
|
||||
nand_ftl_set_tree_probe(1); /* 诊断窗口:挂载+探针的读路径全记录 */
|
||||
FRESULT fr = f_mount(&default_fatfs, "", 1);
|
||||
if (fr == FR_NO_FILESYSTEM) {
|
||||
nand_ftl_set_tree_probe(0); /* mkfs 路径不追踪(I/O 洪泛) */
|
||||
DBG_INFO("[FS] no FAT volume, formatting NAND...");
|
||||
static uint8_t fs_work[FF_MAX_SS];
|
||||
MKFS_PARM opts = { FM_FAT32, 0, 0, 0, 0 };
|
||||
|
||||
Reference in New Issue
Block a user