MTD CVS update: 'mtd/fs/jffs2 README.Locking build.c erase.c gc.c'

David Woodhouse dwmw2 at infradead.org
Fri Mar 8 10:11:25 EST 2002


Update of /home/cvs/mtd/fs/jffs2
In directory infradead.org:/tmp/cvs-serv9305/fs/jffs2

Modified Files:
	README.Locking build.c erase.c gc.c 
Log Message:
	node_free_sem
	-------------

This semaphore is only used by the erase code which frees obsolete
node references and the jffs2_garbage_collect_deletion_dirent()
function. The latter function on NAND flash must read _obsolete_ nodes
to determine whether the 'deletion dirent' under consideration can be
discarded or whether it is still required to show that an inode has
been unlinked. Because reading from the flash may sleep, the
erase_completion_lock cannot be held, so an alternative, more
heavyweight lock was required to prevent the erase code from freeing
the jffs2_raw_node_ref structures in question while the garbage
collection code is looking at them.

Suggestions for alternative solutions to this problem would be welcomed.






More information about the linux-mtd-cvs mailing list