(no subject)

David Woodhouse dwmw2 at infradead.org
Tue Nov 16 08:55:27 EST 2004


On Tue, 2004-11-16 at 13:48 +0000, Artem B. Bityuckiy wrote:
> Hello David,
> 
> When I create checkpoints, I read all the nodes which will be referred by 
> this checkpoint and check their CRCs. This is because we must trust 
> checkpoints and do not check CRCs for them on the iget() call.
> 
> When the Garbage Collector moves node, which is currently referred by an 
> checkpoint inact (I mean the jffs2_garbage_collect_pristine() function), 
> we have to read this node after we GC it. This is the problem. The unclean 
> reboot may happed and we can not guarantee that all noted in checkpoint 
> are OK. :-(
> 
> So, how do you think is it absolutely necessary to check that nodes which 
> are reffered by checkpoint are OK? Is it OK if we just detect errors when 
> we actually read file?

No, that's not OK. We'd actually lose the data in that case, surely? We
_need_ to pick up the new copy of the node, if the old one is absent.
Either we have to obsolete the newer checkpoint or we have to ignore the
checkpoint data if we get a failure, and rescan properly.

-- 
dwmw2





More information about the linux-mtd mailing list