- 论坛徽章:
- 2
|
大家好,
我的硬件是nand flash
kernel2.6.16, jffs2+ubi
最近遇到很多性能问题,
查看源码有个地方不了解,希望熟悉的人告知
在gc的时候,jffs2_garbage_collect_deletion_dirent(), jffs2 要找一个比当前node还要过时的node(遍历整个flash),然后删除,并申请一个新的direntry替换,这是为什么? 我觉得,那个更过时的node,为什么不让他在那里呢?反正我以后某次gc到那个blk会发现这个过时的direntry的啊?
相关的注释
/* On a medium where we can't actually mark nodes obsolete
pernamently, such as NAND flash, we need to work out
whether this deletion dirent is still needed to actively
delete a 'real' dirent with the same name that's still
somewhere else on the flash. */
/* OK. The name really does match. There really is still an older node on
the flash which our deletion dirent obsoletes. So we have to write out
a new deletion dirent to replace it */
多谢!:wink: |
|