Lines Matching +full:nand +full:- +full:related
3 ---------------------------
11 ---------
13 The alloc_sem is a per-filesystem mutex, used primarily to ensure
24 which they belong. This is for the benefit of NAND flash - adding new
26 until this happens we ensure that any data in the write-buffer at the
28 was written afterwards. Hence, we can ensure the newly-obsoleted nodes
29 don't actually get erased until the write-buffer has been flushed to
32 With the introduction of NAND flash support and the write-buffer,
33 the alloc_sem is also used to protect the wbuf-related members of the
37 Ordering constraints: See f->sem.
40 File Mutex f->sem
41 ---------------------
43 This is the JFFS2-internal equivalent of the inode mutex i->i_sem.
49 avoid deadlocks with garbage collection -- the VFS will lock the i_sem
51 allocation may trigger garbage-collection, which may need to move a
54 of the inode from which it's garbage-collecting a physical node, this
65 any f->sem held.
68 3. Never lock a page cache page with f->sem held.
72 ------------------------------
75 per-eraseblock lists of physical jffs2_raw_node_ref structures, and
76 (NB) the per-inode list of physical nodes. The latter is a special
77 case - see below.
79 As the MTD API no longer permits erase-completion callback functions
80 to be called from bottom-half (timer) context (on the basis that nobody
84 Note that the per-inode list of physical nodes (f->nodes) is a special
85 case. Any changes to _valid_ nodes (i.e. ->flash_offset & 1 == 0) in
86 the list are protected by the file mutex f->sem. But the erase code
89 erase_completion_lock, and can drop the lock temporarily mid-walk as
93 The erase_completion_lock is also used to protect the c->gc_task
95 GC thread locks it, sends the signal, then unlocks it - while the GC
96 thread itself locks it, zeroes c->gc_task, then unlocks on the exit path.
100 ----------------------
102 This spinlock protects the hashed list (c->inocache_list) of the
103 in-core jffs2_inode_cache objects (each inode in JFFS2 has the
105 has to be locked while walking the c->inocache_list hash buckets.
108 currently just '++->highest_ino++', but might one day get more complicated
111 Note, the f->sem guarantees that the correspondent jffs2_inode_cache
118 c->erase_completion has to be acquired first.
122 --------------
126 The latter function on NAND flash must read _obsolete_ nodes to
139 --------
142 write-behind buffer ('wbuf') used for flash chips where we must write
148 Lock wbuf_sem last, after the alloc_sem or and f->sem.
151 c->xattr_sem
152 ------------
155 xattr related objects which include stuff in superblock and ic->xref.
156 In read-only path, write-semaphore is too much exclusion. It's enough
157 by read-semaphore. But you must hold write-semaphore when updating,
158 creating or deleting any xattr related object.
163 For example, do_jffs2_getxattr() holds read-semaphore to scan xref and
164 xdatum at first. But it retries this process with holding write-semaphore
165 after release read-semaphore, if it's necessary to load name/value pair