JFFS2 an nodes checking

David Woodhouse dwmw2 at infradead.org
Tue Sep 28 08:37:19 EDT 2004


On Tue, 2004-09-28 at 16:29 +0400, Artem B. Bityuckiy wrote:
> Why when user opens a big file he need to wait while all it's contents 
> will be read? Moreover, the CRCs are checked anyway on any read request 
> (of course, for nodes which are involved to this request). Is this delay 
> really needed? Why not to just leave the inode in the 
> INO_STATE_UNCHECKED state - the Garbage Collector will check it some 
> time? ....

Bear in mind that we discard nodes with invalid data_crc. So they do not
obsolete _older_ nodes which cover the same area. If we don't check the
CRC we can't build up the red-black tree for the inode in the same way
we do at the moment, because we don't actually know which nodes are
valid. We'd have to invent another kind of data structure, in which we
could keep information about overlapping nodes, some of which may turn
out not to be valid. 

At the moment we just have the unsorted raw->next_in_ino list, and the
rbtree in the jffs2_inode_info. 

But yes, it might make some sense to perform this optimisation if it's
not _too_ painful to do it.

-- 
dwmw2





More information about the linux-mtd mailing list