mtd/fs/jffs2 README.Locking,1.6,1.7

Artem Bityuckiy dedekind at infradead.org
Sun Nov 14 06:38:57 EST 2004


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

Modified Files:
	README.Locking 
Log Message:
Add some information about the inocache_lock spinlock.


Index: README.Locking
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/README.Locking,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- README.Locking	2 Nov 2003 19:27:54 -0000	1.6
+++ README.Locking	14 Nov 2004 11:38:54 -0000	1.7
@@ -99,6 +99,25 @@
 GC thread locks it, sends the signal, then unlocks it - while the GC
 thread itself locks it, zeroes c->gc_task, then unlocks on the exit path.
 
+
+	inocache_lock spinlock
+	----------------------
+
+This spinlock protects the hashed list (c->inocache_list) of the
+in-core jffs2_inode_cache objects (each inode in JFFS2 has the
+correspondent jffs2_inode_cache object). So, the inocache_lock
+has to be locked while walking the c->inocache_list hash buckets.
+
+Note, the f->sem guarantees that the correspondent jffs2_inode_cache
+will not be removed. So, it is allowed to access its without locking
+the inocache_lock spinlock. 
+
+Ordering constraints: 
+
+	If both erase_completion_lock and inocache_lock are needed, the
+	c->erase_completion has to be aquired first.
+
+
 	erase_free_sem
 	--------------
 





More information about the linux-mtd-cvs mailing list