public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* struct jffs2_xattr_datum/jffs2_xattr_ref/jffs2_inode_cache
@ 2006-05-22 15:36 David Woodhouse
  2006-05-23  2:01 ` KaiGai Kohei
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2006-05-22 15:36 UTC (permalink / raw)
  To: KaiGai Kohei; +Cc: linux-mtd

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-23  4:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-22 15:36 struct jffs2_xattr_datum/jffs2_xattr_ref/jffs2_inode_cache David Woodhouse
2006-05-23  2:01 ` KaiGai Kohei
2006-05-23  2:26   ` David Woodhouse
2006-05-23  4:05     ` KaiGai Kohei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox