diff options
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 362495078489..8c40ad3c6721 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -151,6 +151,12 @@ | |||
151 | */ | 151 | */ |
152 | #define WORST_COMPR_FACTOR 2 | 152 | #define WORST_COMPR_FACTOR 2 |
153 | 153 | ||
154 | /* | ||
155 | * How much memory is needed for a buffer where we comress a data node. | ||
156 | */ | ||
157 | #define COMPRESSED_DATA_NODE_BUF_SZ \ | ||
158 | (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR) | ||
159 | |||
154 | /* Maximum expected tree height for use by bottom_up_buf */ | 160 | /* Maximum expected tree height for use by bottom_up_buf */ |
155 | #define BOTTOM_UP_HEIGHT 64 | 161 | #define BOTTOM_UP_HEIGHT 64 |
156 | 162 | ||
@@ -1005,6 +1011,11 @@ struct ubifs_debug_info; | |||
1005 | * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu | 1011 | * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu |
1006 | * @bu: pre-allocated bulk-read information | 1012 | * @bu: pre-allocated bulk-read information |
1007 | * | 1013 | * |
1014 | * @write_reserve_mutex: protects @write_reserve_buf | ||
1015 | * @write_reserve_buf: on the write path we allocate memory, which might | ||
1016 | * sometimes be unavailable, in which case we use this | ||
1017 | * write reserve buffer | ||
1018 | * | ||
1008 | * @log_lebs: number of logical eraseblocks in the log | 1019 | * @log_lebs: number of logical eraseblocks in the log |
1009 | * @log_bytes: log size in bytes | 1020 | * @log_bytes: log size in bytes |
1010 | * @log_last: last LEB of the log | 1021 | * @log_last: last LEB of the log |
@@ -1256,6 +1267,9 @@ struct ubifs_info { | |||
1256 | struct mutex bu_mutex; | 1267 | struct mutex bu_mutex; |
1257 | struct bu_info bu; | 1268 | struct bu_info bu; |
1258 | 1269 | ||
1270 | struct mutex write_reserve_mutex; | ||
1271 | void *write_reserve_buf; | ||
1272 | |||
1259 | int log_lebs; | 1273 | int log_lebs; |
1260 | long long log_bytes; | 1274 | long long log_bytes; |
1261 | int log_last; | 1275 | int log_last; |