JFFS2 an nodes checking

David Woodhouse dwmw2 at infradead.org
Tue Sep 28 10:04:14 EDT 2004


On Tue, 2004-09-28 at 17:57 +0400, Artem B. Bityuckiy wrote:
> Sorry, I don't understand. Suppose, after unclean reboot the bad last 
> node appears. Before any write, this last node will be detected *before 
> write* since the iget() will be called before it. Is it?

True, but it won't necessarily be _deleted_ so it could still be there
on the _next_ boot.

> Ok, anyway, there are possibilities to improve the iget().
> 
> What do you think the best way to do such change (no check on iget())
> ?

You have to make the read/write code capable of dealing with the fact
that the full rbtree hasn't been built. Possibly you sort through the
raw nodes and put them into _pools_, each covering something like a
256KiB of the file. Then when you get a read or write of any such range,
you check the CRCs for the nodes in that _range_ and build the full map
only for that range of the file. It sounds painful, to be honest -- I'd
rather just tell people not to use such large files on JFFS2 -- split it
up into multiple files instead.

-- 
dwmw2





More information about the linux-mtd mailing list