Rational for JFFS2 deletion dirent ?
dwmw2 at infradead.org
Mon Dec 3 15:05:01 EST 2001
saffroy at ri.silicomp.fr said:
> I'm currently looking at the JFFS2 code, and I was wondering why the
> unlink operation creates a deletion dirent. Isn't it sufficient to
> mark the old dirent as obsolete ?
On NAND flash you can't do that.
> BTW, I can't find where deletion dirents are actually removed, except
> when their parent directory is removed or their erasure block is
> garbage collected, have I missed other places ?
Nope, they should only be removed when their erase block is garbage
collected, if there's no longer any requirement for them.
Actually, now I come to mention it I'm not convinced I actually did that bit
right - they may be removed unconditionally on GC, and to make NAND flash
work right we'll need to remove them only if they're no longer required
(because all previous dirent nodes which they obsolete are already GC'd).
More information about the linux-mtd