joakim.tjernlund@xxxxxxx.se said:
>
> How? I figure that iff ACCURATE bit is set in a CLEANMARKER, then
> that erase block is empty. On first write to such a EB, clear
> ACCURATE bit in the CLEANMARKER node and then write you data to flash.
> Can't see how to do that in jffs2_mark_node_obsolete()
You don't do that in jffs2_mark_node_obsolete(). But it does allow you to
get rid of the change you wanted to introduce to jffs2_mark_node_obsolete():
- } else if (!jeb->used_size) {
+ } else if ((jeb->used_size == PAD(sizeof(struct jffs2_unknown_node)) && !jeb->first_node->next_in_ino)
... because you know that the CLEANMARKER node will be obsoleted, and hence
used_size will be zero.
However, you can't necessarily rely on the CLEANMARKER node being marked
obsolete on the flash, by having the ACCURATE bit removed - not all
hardware supports that. I suppose for that hardware we can just do the scan
completely as we do today, so that's not too much of a problem.
--
dwmw2
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com