13 #ifndef _JFFS2_DEBUG_H_ 14 #define _JFFS2_DEBUG_H_ 16 #include <linux/sched.h> 18 #ifndef CONFIG_JFFS2_FS_DEBUG 19 #define CONFIG_JFFS2_FS_DEBUG 0 22 #if CONFIG_JFFS2_FS_DEBUG > 0 24 #define JFFS2_DBG_PARANOIA_CHECKS 25 #define JFFS2_DBG_DUMPS 31 #define JFFS2_DBG_READINODE_MESSAGES 32 #define JFFS2_DBG_FRAGTREE_MESSAGES 33 #define JFFS2_DBG_DENTLIST_MESSAGES 34 #define JFFS2_DBG_NODEREF_MESSAGES 35 #define JFFS2_DBG_INOCACHE_MESSAGES 36 #define JFFS2_DBG_SUMMARY_MESSAGES 37 #define JFFS2_DBG_FSBUILD_MESSAGES 40 #if CONFIG_JFFS2_FS_DEBUG > 1 41 #define JFFS2_DBG_FRAGTREE2_MESSAGES 42 #define JFFS2_DBG_READINODE2_MESSAGES 43 #define JFFS2_DBG_MEMALLOC_MESSAGES 47 #define JFFS2_DBG_SANITY_CHECKS 53 #if CONFIG_JFFS2_FS_DEBUG > 0 60 #if CONFIG_JFFS2_FS_DEBUG > 1 66 #define jffs2_dbg(level, fmt, ...) \ 68 if (CONFIG_JFFS2_FS_DEBUG >= level) \ 69 pr_debug(fmt, ##__VA_ARGS__); \ 73 #define JFFS2_DBG KERN_DEBUG 74 #define JFFS2_DBG_PREFIX "[JFFS2 DBG]" 75 #define JFFS2_DBG_MSG_PREFIX JFFS2_DBG JFFS2_DBG_PREFIX 79 #define JFFS2_ERROR(fmt, ...) \ 80 pr_err("error: (%d) %s: " fmt, \ 81 task_pid_nr(current), __func__, ##__VA_ARGS__) 83 #define JFFS2_WARNING(fmt, ...) \ 84 pr_warn("warning: (%d) %s: " fmt, \ 85 task_pid_nr(current), __func__, ##__VA_ARGS__) 87 #define JFFS2_NOTICE(fmt, ...) \ 88 pr_notice("notice: (%d) %s: " fmt, \ 89 task_pid_nr(current), __func__, ##__VA_ARGS__) 91 #define JFFS2_DEBUG(fmt, ...) \ 92 printk(KERN_DEBUG "[JFFS2 DBG] (%d) %s: " fmt, \ 93 task_pid_nr(current), __func__, ##__VA_ARGS__) 95 #define JFFS2_ERROR(fmt, ...) \ 96 pr_err("error: %s: " fmt, \ 97 __func__, ##__VA_ARGS__) 99 #define JFFS2_WARNING(fmt, ...) \ 100 pr_warn("warning: %s: " fmt, \ 101 __func__, ##__VA_ARGS__) 103 #define JFFS2_NOTICE(fmt, ...) \ 104 pr_notice("notice: %s: " fmt, \ 105 __func__, ##__VA_ARGS__) 107 #define JFFS2_DEBUG(fmt, ...) \ 108 printk(KERN_DEBUG "[JFFS2 DBG] %s: " fmt, \ 109 __func__, ##__VA_ARGS__) 117 #ifdef JFFS2_DBG_READINODE_MESSAGES 118 #define dbg_readinode(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 120 #define dbg_readinode(fmt, ...) 122 #ifdef JFFS2_DBG_READINODE2_MESSAGES 123 #define dbg_readinode2(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 125 #define dbg_readinode2(fmt, ...) 129 #ifdef JFFS2_DBG_FRAGTREE_MESSAGES 130 #define dbg_fragtree(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 132 #define dbg_fragtree(fmt, ...) 134 #ifdef JFFS2_DBG_FRAGTREE2_MESSAGES 135 #define dbg_fragtree2(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 137 #define dbg_fragtree2(fmt, ...) 141 #ifdef JFFS2_DBG_DENTLIST_MESSAGES 142 #define dbg_dentlist(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 144 #define dbg_dentlist(fmt, ...) 148 #ifdef JFFS2_DBG_NODEREF_MESSAGES 149 #define dbg_noderef(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 151 #define dbg_noderef(fmt, ...) 155 #ifdef JFFS2_DBG_INOCACHE_MESSAGES 156 #define dbg_inocache(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 158 #define dbg_inocache(fmt, ...) 162 #ifdef JFFS2_DBG_SUMMARY_MESSAGES 163 #define dbg_summary(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 165 #define dbg_summary(fmt, ...) 169 #ifdef JFFS2_DBG_FSBUILD_MESSAGES 170 #define dbg_fsbuild(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 172 #define dbg_fsbuild(fmt, ...) 176 #ifdef JFFS2_DBG_MEMALLOC_MESSAGES 177 #define dbg_memalloc(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 179 #define dbg_memalloc(fmt, ...) 183 #ifdef JFFS2_DBG_XATTR_MESSAGES 184 #define dbg_xattr(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) 186 #define dbg_xattr(fmt, ...) 191 __jffs2_dbg_acct_sanity_check_nolock(
struct jffs2_sb_info *c,
206 __jffs2_dbg_acct_paranoia_check_nolock(
struct jffs2_sb_info *c,
210 uint32_t ofs,
int len);
220 __jffs2_dbg_dump_block_lists_nolock(
struct jffs2_sb_info *c);
232 __jffs2_dbg_dump_buffer(
unsigned char *buf,
int len, uint32_t offs);
234 __jffs2_dbg_dump_node(
struct jffs2_sb_info *c, uint32_t ofs);
236 #ifdef JFFS2_DBG_PARANOIA_CHECKS 237 #define jffs2_dbg_fragtree_paranoia_check(f) \ 238 __jffs2_dbg_fragtree_paranoia_check(f) 239 #define jffs2_dbg_fragtree_paranoia_check_nolock(f) \ 240 __jffs2_dbg_fragtree_paranoia_check_nolock(f) 241 #define jffs2_dbg_acct_paranoia_check(c, jeb) \ 242 __jffs2_dbg_acct_paranoia_check(c,jeb) 243 #define jffs2_dbg_acct_paranoia_check_nolock(c, jeb) \ 244 __jffs2_dbg_acct_paranoia_check_nolock(c,jeb) 245 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) \ 246 __jffs2_dbg_prewrite_paranoia_check(c, ofs, len) 248 #define jffs2_dbg_fragtree_paranoia_check(f) 249 #define jffs2_dbg_fragtree_paranoia_check_nolock(f) 250 #define jffs2_dbg_acct_paranoia_check(c, jeb) 251 #define jffs2_dbg_acct_paranoia_check_nolock(c, jeb) 252 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) 255 #ifdef JFFS2_DBG_DUMPS 256 #define jffs2_dbg_dump_jeb(c, jeb) \ 257 __jffs2_dbg_dump_jeb(c, jeb); 258 #define jffs2_dbg_dump_jeb_nolock(jeb) \ 259 __jffs2_dbg_dump_jeb_nolock(jeb); 260 #define jffs2_dbg_dump_block_lists(c) \ 261 __jffs2_dbg_dump_block_lists(c) 262 #define jffs2_dbg_dump_block_lists_nolock(c) \ 263 __jffs2_dbg_dump_block_lists_nolock(c) 264 #define jffs2_dbg_dump_fragtree(f) \ 265 __jffs2_dbg_dump_fragtree(f); 266 #define jffs2_dbg_dump_fragtree_nolock(f) \ 267 __jffs2_dbg_dump_fragtree_nolock(f); 268 #define jffs2_dbg_dump_buffer(buf, len, offs) \ 269 __jffs2_dbg_dump_buffer(*buf, len, offs); 270 #define jffs2_dbg_dump_node(c, ofs) \ 271 __jffs2_dbg_dump_node(c, ofs); 273 #define jffs2_dbg_dump_jeb(c, jeb) 274 #define jffs2_dbg_dump_jeb_nolock(jeb) 275 #define jffs2_dbg_dump_block_lists(c) 276 #define jffs2_dbg_dump_block_lists_nolock(c) 277 #define jffs2_dbg_dump_fragtree(f) 278 #define jffs2_dbg_dump_fragtree_nolock(f) 279 #define jffs2_dbg_dump_buffer(buf, len, offs) 280 #define jffs2_dbg_dump_node(c, ofs) 283 #ifdef JFFS2_DBG_SANITY_CHECKS 284 #define jffs2_dbg_acct_sanity_check(c, jeb) \ 285 __jffs2_dbg_acct_sanity_check(c, jeb) 286 #define jffs2_dbg_acct_sanity_check_nolock(c, jeb) \ 287 __jffs2_dbg_acct_sanity_check_nolock(c, jeb) 289 #define jffs2_dbg_acct_sanity_check(c, jeb) 290 #define jffs2_dbg_acct_sanity_check_nolock(c, jeb) Definition: nodelist.h:277
Definition: jffs2_fs_sb.h:48
Definition: jffs2_fs_i.h:20