struct jffs2_xattr_datum/jffs2_xattr_ref/jffs2_inode_cache
David Woodhouse
dwmw2 at infradead.org
Mon May 22 11:36:55 EDT 2006
Kaigai-san,
To fix the problems with xattr node deletion, I think you'll need to
just mark nodes obsolete like we do for inode nodes, and keep them in
_list_ of physical nodes attached to a struct jffs2_xattr_datum -- just
the same as the jffs2_inode_cache has a _list_ of nodes.
To avoid re-using xids too early, you'll need the jffs2_xattr_datum to
be removed only when that list is completely empty, in erase.c.
I've (helpfully) added a BUG_ON() in the two places it's likely to be
important, where we assume that what we find at the end of a
->next_in_ino list is a jffs2_inode_cache.
I've also shuffled the three structures so that they all start the
same...
{
void *scan_dents; /* Unused in XATTR */
struct jffs2_raw_node_ref *nodes;
uint8_t class;
...
I've also extended jffs2_link_node_ref() so that it adds the new
jffs2_raw_node_ref to a jffs2_inode_cache. It should _also_ be able to
add the ref to an xattr_ref or xattr_datum too.
Does that look OK?
I've done all this in the mtd-2.6.git tree -- I've pulled what was in
the jffs2-devel-2.6.git tree into that already.
--
dwmw2
More information about the linux-mtd
mailing list