diff options
Diffstat (limited to 'fs/ubifs/debug.h')
| -rw-r--r-- | fs/ubifs/debug.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index a811ac4a26bb..b59c43a4149c 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
| @@ -33,6 +33,13 @@ typedef int (*dbg_znode_callback)(struct ubifs_info *c, | |||
| 33 | 33 | ||
| 34 | #include <linux/random.h> | 34 | #include <linux/random.h> |
| 35 | 35 | ||
| 36 | /* | ||
| 37 | * The UBIFS debugfs directory name pattern and maximum name length (3 for "ubi" | ||
| 38 | * + 1 for "_" and plus 2x2 for 2 UBI numbers and 1 for the trailing zero byte. | ||
| 39 | */ | ||
| 40 | #define UBIFS_DFS_DIR_NAME "ubi%d_%d" | ||
| 41 | #define UBIFS_DFS_DIR_LEN (3 + 1 + 2*2 + 1) | ||
| 42 | |||
| 36 | /** | 43 | /** |
| 37 | * ubifs_debug_info - per-FS debugging information. | 44 | * ubifs_debug_info - per-FS debugging information. |
| 38 | * @old_zroot: old index root - used by 'dbg_check_old_index()' | 45 | * @old_zroot: old index root - used by 'dbg_check_old_index()' |
| @@ -84,7 +91,7 @@ struct ubifs_debug_info { | |||
| 84 | long long saved_free; | 91 | long long saved_free; |
| 85 | int saved_idx_gc_cnt; | 92 | int saved_idx_gc_cnt; |
| 86 | 93 | ||
| 87 | char dfs_dir_name[100]; | 94 | char dfs_dir_name[UBIFS_DFS_DIR_LEN + 1]; |
| 88 | struct dentry *dfs_dir; | 95 | struct dentry *dfs_dir; |
| 89 | struct dentry *dfs_dump_lprops; | 96 | struct dentry *dfs_dump_lprops; |
| 90 | struct dentry *dfs_dump_budg; | 97 | struct dentry *dfs_dump_budg; |
| @@ -313,7 +320,7 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c); | |||
| 313 | 320 | ||
| 314 | /* Use "if (0)" to make compiler check arguments even if debugging is off */ | 321 | /* Use "if (0)" to make compiler check arguments even if debugging is off */ |
| 315 | #define ubifs_assert(expr) do { \ | 322 | #define ubifs_assert(expr) do { \ |
| 316 | if (0 && (expr)) \ | 323 | if (0) \ |
| 317 | printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \ | 324 | printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \ |
| 318 | __func__, __LINE__, current->pid); \ | 325 | __func__, __LINE__, current->pid); \ |
| 319 | } while (0) | 326 | } while (0) |
