aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ubifs.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-17 06:31:39 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-03 06:14:33 -0500
commit17c2f9f85c896b48a5d74a9155d99ec5b241a0e6 (patch)
tree9d3e38e673d1d3af650072388a671ec767d3941a /fs/ubifs/ubifs.h
parent5dd7cbc083f3a91fa7454125fe992826701b67bc (diff)
UBIFS: separate debugging fields out
Introduce a new data structure which contains all debugging stuff inside. This is cleaner than having debugging stuff directly in 'c'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r--fs/ubifs/ubifs.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 16840e099eff..7e090a5e2bf6 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -910,6 +910,8 @@ struct ubifs_mount_opts {
910 unsigned int compr_type:2; 910 unsigned int compr_type:2;
911}; 911};
912 912
913struct ubifs_debug_info;
914
913/** 915/**
914 * struct ubifs_info - UBIFS file-system description data structure 916 * struct ubifs_info - UBIFS file-system description data structure
915 * (per-superblock). 917 * (per-superblock).
@@ -972,8 +974,6 @@ struct ubifs_mount_opts {
972 * @ileb_nxt: next pre-allocated index LEBs 974 * @ileb_nxt: next pre-allocated index LEBs
973 * @old_idx: tree of index nodes obsoleted since the last commit start 975 * @old_idx: tree of index nodes obsoleted since the last commit start
974 * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c 976 * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c
975 * @new_ihead_lnum: used by debugging to check ihead_lnum
976 * @new_ihead_offs: used by debugging to check ihead_offs
977 * 977 *
978 * @mst_node: master node 978 * @mst_node: master node
979 * @mst_offs: offset of valid master node 979 * @mst_offs: offset of valid master node
@@ -1157,15 +1157,7 @@ struct ubifs_mount_opts {
1157 * @always_chk_crc: always check CRCs (while mounting and remounting rw) 1157 * @always_chk_crc: always check CRCs (while mounting and remounting rw)
1158 * @mount_opts: UBIFS-specific mount options 1158 * @mount_opts: UBIFS-specific mount options
1159 * 1159 *
1160 * @dbg_buf: a buffer of LEB size used for debugging purposes 1160 * @dbg: debugging-related information
1161 * @old_zroot: old index root - used by 'dbg_check_old_index()'
1162 * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
1163 * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
1164 * @failure_mode: failure mode for recovery testing
1165 * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
1166 * @fail_timeout: time in jiffies when delay of failure mode expires
1167 * @fail_cnt: current number of calls to failure mode I/O functions
1168 * @fail_cnt_max: number of calls by which to delay failure mode
1169 */ 1161 */
1170struct ubifs_info { 1162struct ubifs_info {
1171 struct super_block *vfs_sb; 1163 struct super_block *vfs_sb;
@@ -1221,10 +1213,6 @@ struct ubifs_info {
1221 int ileb_nxt; 1213 int ileb_nxt;
1222 struct rb_root old_idx; 1214 struct rb_root old_idx;
1223 int *bottom_up_buf; 1215 int *bottom_up_buf;
1224#ifdef CONFIG_UBIFS_FS_DEBUG
1225 int new_ihead_lnum;
1226 int new_ihead_offs;
1227#endif
1228 1216
1229 struct ubifs_mst_node *mst_node; 1217 struct ubifs_mst_node *mst_node;
1230 int mst_offs; 1218 int mst_offs;
@@ -1399,21 +1387,7 @@ struct ubifs_info {
1399 struct ubifs_mount_opts mount_opts; 1387 struct ubifs_mount_opts mount_opts;
1400 1388
1401#ifdef CONFIG_UBIFS_FS_DEBUG 1389#ifdef CONFIG_UBIFS_FS_DEBUG
1402 void *dbg_buf; 1390 struct ubifs_debug_info *dbg;
1403 struct ubifs_zbranch old_zroot;
1404 int old_zroot_level;
1405 unsigned long long old_zroot_sqnum;
1406 int failure_mode;
1407 int fail_delay;
1408 unsigned long fail_timeout;
1409 unsigned int fail_cnt;
1410 unsigned int fail_cnt_max;
1411 long long chk_lpt_sz;
1412 long long chk_lpt_sz2;
1413 long long chk_lpt_wastage;
1414 int chk_lpt_lebs;
1415 int new_nhead_lnum;
1416 int new_nhead_offs;
1417#endif 1391#endif
1418}; 1392};
1419 1393