aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/jffs2_fs_sb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/jffs2_fs_sb.h')
-rw-r--r--include/linux/jffs2_fs_sb.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h
index 1e21546622de..4bcfb5570221 100644
--- a/include/linux/jffs2_fs_sb.h
+++ b/include/linux/jffs2_fs_sb.h
@@ -1,4 +1,4 @@
1/* $Id: jffs2_fs_sb.h,v 1.52 2005/05/19 16:12:17 gleixner Exp $ */ 1/* $Id: jffs2_fs_sb.h,v 1.54 2005/09/21 13:37:34 dedekind Exp $ */
2 2
3#ifndef _JFFS2_FS_SB 3#ifndef _JFFS2_FS_SB
4#define _JFFS2_FS_SB 4#define _JFFS2_FS_SB
@@ -20,7 +20,7 @@
20struct jffs2_inodirty; 20struct jffs2_inodirty;
21 21
22/* A struct for the overall file system control. Pointers to 22/* A struct for the overall file system control. Pointers to
23 jffs2_sb_info structs are named `c' in the source code. 23 jffs2_sb_info structs are named `c' in the source code.
24 Nee jffs_control 24 Nee jffs_control
25*/ 25*/
26struct jffs2_sb_info { 26struct jffs2_sb_info {
@@ -35,7 +35,7 @@ struct jffs2_sb_info {
35 struct completion gc_thread_start; /* GC thread start completion */ 35 struct completion gc_thread_start; /* GC thread start completion */
36 struct completion gc_thread_exit; /* GC thread exit completion port */ 36 struct completion gc_thread_exit; /* GC thread exit completion port */
37 37
38 struct semaphore alloc_sem; /* Used to protect all the following 38 struct semaphore alloc_sem; /* Used to protect all the following
39 fields, and also to protect against 39 fields, and also to protect against
40 out-of-order writing of nodes. And GC. */ 40 out-of-order writing of nodes. And GC. */
41 uint32_t cleanmarker_size; /* Size of an _inline_ CLEANMARKER 41 uint32_t cleanmarker_size; /* Size of an _inline_ CLEANMARKER
@@ -64,7 +64,7 @@ struct jffs2_sb_info {
64 uint32_t nospc_dirty_size; 64 uint32_t nospc_dirty_size;
65 65
66 uint32_t nr_blocks; 66 uint32_t nr_blocks;
67 struct jffs2_eraseblock *blocks; /* The whole array of blocks. Used for getting blocks 67 struct jffs2_eraseblock *blocks; /* The whole array of blocks. Used for getting blocks
68 * from the offset (blocks[ofs / sector_size]) */ 68 * from the offset (blocks[ofs / sector_size]) */
69 struct jffs2_eraseblock *nextblock; /* The block we're currently filling */ 69 struct jffs2_eraseblock *nextblock; /* The block we're currently filling */
70 70
@@ -82,25 +82,26 @@ struct jffs2_sb_info {
82 struct list_head bad_list; /* Bad blocks. */ 82 struct list_head bad_list; /* Bad blocks. */
83 struct list_head bad_used_list; /* Bad blocks with valid data in. */ 83 struct list_head bad_used_list; /* Bad blocks with valid data in. */
84 84
85 spinlock_t erase_completion_lock; /* Protect free_list and erasing_list 85 spinlock_t erase_completion_lock; /* Protect free_list and erasing_list
86 against erase completion handler */ 86 against erase completion handler */
87 wait_queue_head_t erase_wait; /* For waiting for erases to complete */ 87 wait_queue_head_t erase_wait; /* For waiting for erases to complete */
88 88
89 wait_queue_head_t inocache_wq; 89 wait_queue_head_t inocache_wq;
90 struct jffs2_inode_cache **inocache_list; 90 struct jffs2_inode_cache **inocache_list;
91 spinlock_t inocache_lock; 91 spinlock_t inocache_lock;
92 92
93 /* Sem to allow jffs2_garbage_collect_deletion_dirent to 93 /* Sem to allow jffs2_garbage_collect_deletion_dirent to
94 drop the erase_completion_lock while it's holding a pointer 94 drop the erase_completion_lock while it's holding a pointer
95 to an obsoleted node. I don't like this. Alternatives welcomed. */ 95 to an obsoleted node. I don't like this. Alternatives welcomed. */
96 struct semaphore erase_free_sem; 96 struct semaphore erase_free_sem;
97 97
98 uint32_t wbuf_pagesize; /* 0 for NOR and other flashes with no wbuf */
99
98#ifdef CONFIG_JFFS2_FS_WRITEBUFFER 100#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
99 /* Write-behind buffer for NAND flash */ 101 /* Write-behind buffer for NAND flash */
100 unsigned char *wbuf; 102 unsigned char *wbuf;
101 uint32_t wbuf_ofs; 103 uint32_t wbuf_ofs;
102 uint32_t wbuf_len; 104 uint32_t wbuf_len;
103 uint32_t wbuf_pagesize;
104 struct jffs2_inodirty *wbuf_inodes; 105 struct jffs2_inodirty *wbuf_inodes;
105 106
106 struct rw_semaphore wbuf_sem; /* Protects the write buffer */ 107 struct rw_semaphore wbuf_sem; /* Protects the write buffer */
@@ -112,6 +113,8 @@ struct jffs2_sb_info {
112 uint32_t fsdata_len; 113 uint32_t fsdata_len;
113#endif 114#endif
114 115
116 struct jffs2_summary *summary; /* Summary information */
117
115 /* OS-private pointer for getting back to master superblock info */ 118 /* OS-private pointer for getting back to master superblock info */
116 void *os_priv; 119 void *os_priv;
117}; 120};