debug.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. /*
  2. * This file is part of UBIFS.
  3. *
  4. * Copyright (C) 2006-2008 Nokia Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; if not, write to the Free Software Foundation, Inc., 51
  17. * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  18. *
  19. * Authors: Artem Bityutskiy (Битюцкий Артём)
  20. * Adrian Hunter
  21. */
  22. #ifndef __UBIFS_DEBUG_H__
  23. #define __UBIFS_DEBUG_H__
  24. #ifdef CONFIG_UBIFS_FS_DEBUG
  25. /**
  26. * ubifs_debug_info - per-FS debugging information.
  27. * @buf: a buffer of LEB size, used for various purposes
  28. * @old_zroot: old index root - used by 'dbg_check_old_index()'
  29. * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
  30. * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
  31. * @failure_mode: failure mode for recovery testing
  32. * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
  33. * @fail_timeout: time in jiffies when delay of failure mode expires
  34. * @fail_cnt: current number of calls to failure mode I/O functions
  35. * @fail_cnt_max: number of calls by which to delay failure mode
  36. * @chk_lpt_sz: used by LPT tree size checker
  37. * @chk_lpt_sz2: used by LPT tree size checker
  38. * @chk_lpt_wastage: used by LPT tree size checker
  39. * @chk_lpt_lebs: used by LPT tree size checker
  40. * @new_nhead_offs: used by LPT tree size checker
  41. * @new_ihead_lnum: used by debugging to check @c->ihead_lnum
  42. * @new_ihead_offs: used by debugging to check @c->ihead_offs
  43. *
  44. * @saved_lst: saved lprops statistics (used by 'dbg_save_space_info()')
  45. * @saved_free: saved free space (used by 'dbg_save_space_info()')
  46. *
  47. * dfs_dir_name: name of debugfs directory containing this file-system's files
  48. * dfs_dir: direntry object of the file-system debugfs directory
  49. * dfs_dump_lprops: "dump lprops" debugfs knob
  50. * dfs_dump_budg: "dump budgeting information" debugfs knob
  51. * dfs_dump_tnc: "dump TNC" debugfs knob
  52. */
  53. struct ubifs_debug_info {
  54. void *buf;
  55. struct ubifs_zbranch old_zroot;
  56. int old_zroot_level;
  57. unsigned long long old_zroot_sqnum;
  58. int failure_mode;
  59. int fail_delay;
  60. unsigned long fail_timeout;
  61. unsigned int fail_cnt;
  62. unsigned int fail_cnt_max;
  63. long long chk_lpt_sz;
  64. long long chk_lpt_sz2;
  65. long long chk_lpt_wastage;
  66. int chk_lpt_lebs;
  67. int new_nhead_offs;
  68. int new_ihead_lnum;
  69. int new_ihead_offs;
  70. struct ubifs_lp_stats saved_lst;
  71. long long saved_free;
  72. char dfs_dir_name[100];
  73. struct dentry *dfs_dir;
  74. struct dentry *dfs_dump_lprops;
  75. struct dentry *dfs_dump_budg;
  76. struct dentry *dfs_dump_tnc;
  77. };
  78. #define ubifs_assert(expr) do { \
  79. if (unlikely(!(expr))) { \
  80. printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
  81. __func__, __LINE__, current->pid); \
  82. dbg_dump_stack(); \
  83. } \
  84. } while (0)
  85. #define ubifs_assert_cmt_locked(c) do { \
  86. if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
  87. up_write(&(c)->commit_sem); \
  88. printk(KERN_CRIT "commit lock is not locked!\n"); \
  89. ubifs_assert(0); \
  90. } \
  91. } while (0)
  92. #define dbg_dump_stack() do { \
  93. if (!dbg_failure_mode) \
  94. dump_stack(); \
  95. } while (0)
  96. /* Generic debugging messages */
  97. #define dbg_msg(fmt, ...) do { \
  98. spin_lock(&dbg_lock); \
  99. printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid, \
  100. __func__, ##__VA_ARGS__); \
  101. spin_unlock(&dbg_lock); \
  102. } while (0)
  103. #define dbg_do_msg(typ, fmt, ...) do { \
  104. if (ubifs_msg_flags & typ) \
  105. dbg_msg(fmt, ##__VA_ARGS__); \
  106. } while (0)
  107. #define dbg_err(fmt, ...) do { \
  108. spin_lock(&dbg_lock); \
  109. ubifs_err(fmt, ##__VA_ARGS__); \
  110. spin_unlock(&dbg_lock); \
  111. } while (0)
  112. const char *dbg_key_str0(const struct ubifs_info *c,
  113. const union ubifs_key *key);
  114. const char *dbg_key_str1(const struct ubifs_info *c,
  115. const union ubifs_key *key);
  116. /*
  117. * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message
  118. * macros.
  119. */
  120. #define DBGKEY(key) dbg_key_str0(c, (key))
  121. #define DBGKEY1(key) dbg_key_str1(c, (key))
  122. /* General messages */
  123. #define dbg_gen(fmt, ...) dbg_do_msg(UBIFS_MSG_GEN, fmt, ##__VA_ARGS__)
  124. /* Additional journal messages */
  125. #define dbg_jnl(fmt, ...) dbg_do_msg(UBIFS_MSG_JNL, fmt, ##__VA_ARGS__)
  126. /* Additional TNC messages */
  127. #define dbg_tnc(fmt, ...) dbg_do_msg(UBIFS_MSG_TNC, fmt, ##__VA_ARGS__)
  128. /* Additional lprops messages */
  129. #define dbg_lp(fmt, ...) dbg_do_msg(UBIFS_MSG_LP, fmt, ##__VA_ARGS__)
  130. /* Additional LEB find messages */
  131. #define dbg_find(fmt, ...) dbg_do_msg(UBIFS_MSG_FIND, fmt, ##__VA_ARGS__)
  132. /* Additional mount messages */
  133. #define dbg_mnt(fmt, ...) dbg_do_msg(UBIFS_MSG_MNT, fmt, ##__VA_ARGS__)
  134. /* Additional I/O messages */
  135. #define dbg_io(fmt, ...) dbg_do_msg(UBIFS_MSG_IO, fmt, ##__VA_ARGS__)
  136. /* Additional commit messages */
  137. #define dbg_cmt(fmt, ...) dbg_do_msg(UBIFS_MSG_CMT, fmt, ##__VA_ARGS__)
  138. /* Additional budgeting messages */
  139. #define dbg_budg(fmt, ...) dbg_do_msg(UBIFS_MSG_BUDG, fmt, ##__VA_ARGS__)
  140. /* Additional log messages */
  141. #define dbg_log(fmt, ...) dbg_do_msg(UBIFS_MSG_LOG, fmt, ##__VA_ARGS__)
  142. /* Additional gc messages */
  143. #define dbg_gc(fmt, ...) dbg_do_msg(UBIFS_MSG_GC, fmt, ##__VA_ARGS__)
  144. /* Additional scan messages */
  145. #define dbg_scan(fmt, ...) dbg_do_msg(UBIFS_MSG_SCAN, fmt, ##__VA_ARGS__)
  146. /* Additional recovery messages */
  147. #define dbg_rcvry(fmt, ...) dbg_do_msg(UBIFS_MSG_RCVRY, fmt, ##__VA_ARGS__)
  148. /*
  149. * Debugging message type flags (must match msg_type_names in debug.c).
  150. *
  151. * UBIFS_MSG_GEN: general messages
  152. * UBIFS_MSG_JNL: journal messages
  153. * UBIFS_MSG_MNT: mount messages
  154. * UBIFS_MSG_CMT: commit messages
  155. * UBIFS_MSG_FIND: LEB find messages
  156. * UBIFS_MSG_BUDG: budgeting messages
  157. * UBIFS_MSG_GC: garbage collection messages
  158. * UBIFS_MSG_TNC: TNC messages
  159. * UBIFS_MSG_LP: lprops messages
  160. * UBIFS_MSG_IO: I/O messages
  161. * UBIFS_MSG_LOG: log messages
  162. * UBIFS_MSG_SCAN: scan messages
  163. * UBIFS_MSG_RCVRY: recovery messages
  164. */
  165. enum {
  166. UBIFS_MSG_GEN = 0x1,
  167. UBIFS_MSG_JNL = 0x2,
  168. UBIFS_MSG_MNT = 0x4,
  169. UBIFS_MSG_CMT = 0x8,
  170. UBIFS_MSG_FIND = 0x10,
  171. UBIFS_MSG_BUDG = 0x20,
  172. UBIFS_MSG_GC = 0x40,
  173. UBIFS_MSG_TNC = 0x80,
  174. UBIFS_MSG_LP = 0x100,
  175. UBIFS_MSG_IO = 0x200,
  176. UBIFS_MSG_LOG = 0x400,
  177. UBIFS_MSG_SCAN = 0x800,
  178. UBIFS_MSG_RCVRY = 0x1000,
  179. };
  180. /* Debugging message type flags for each default debug message level */
  181. #define UBIFS_MSG_LVL_0 0
  182. #define UBIFS_MSG_LVL_1 0x1
  183. #define UBIFS_MSG_LVL_2 0x7f
  184. #define UBIFS_MSG_LVL_3 0xffff
  185. /*
  186. * Debugging check flags (must match chk_names in debug.c).
  187. *
  188. * UBIFS_CHK_GEN: general checks
  189. * UBIFS_CHK_TNC: check TNC
  190. * UBIFS_CHK_IDX_SZ: check index size
  191. * UBIFS_CHK_ORPH: check orphans
  192. * UBIFS_CHK_OLD_IDX: check the old index
  193. * UBIFS_CHK_LPROPS: check lprops
  194. * UBIFS_CHK_FS: check the file-system
  195. */
  196. enum {
  197. UBIFS_CHK_GEN = 0x1,
  198. UBIFS_CHK_TNC = 0x2,
  199. UBIFS_CHK_IDX_SZ = 0x4,
  200. UBIFS_CHK_ORPH = 0x8,
  201. UBIFS_CHK_OLD_IDX = 0x10,
  202. UBIFS_CHK_LPROPS = 0x20,
  203. UBIFS_CHK_FS = 0x40,
  204. };
  205. /*
  206. * Special testing flags (must match tst_names in debug.c).
  207. *
  208. * UBIFS_TST_FORCE_IN_THE_GAPS: force the use of in-the-gaps method
  209. * UBIFS_TST_RCVRY: failure mode for recovery testing
  210. */
  211. enum {
  212. UBIFS_TST_FORCE_IN_THE_GAPS = 0x2,
  213. UBIFS_TST_RCVRY = 0x4,
  214. };
  215. #if CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 1
  216. #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_1
  217. #elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 2
  218. #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_2
  219. #elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 3
  220. #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_3
  221. #else
  222. #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_0
  223. #endif
  224. #ifdef CONFIG_UBIFS_FS_DEBUG_CHKS
  225. #define UBIFS_CHK_FLAGS_DEFAULT 0xffffffff
  226. #else
  227. #define UBIFS_CHK_FLAGS_DEFAULT 0
  228. #endif
  229. extern spinlock_t dbg_lock;
  230. extern unsigned int ubifs_msg_flags;
  231. extern unsigned int ubifs_chk_flags;
  232. extern unsigned int ubifs_tst_flags;
  233. int ubifs_debugging_init(struct ubifs_info *c);
  234. void ubifs_debugging_exit(struct ubifs_info *c);
  235. /* Dump functions */
  236. const char *dbg_ntype(int type);
  237. const char *dbg_cstate(int cmt_state);
  238. const char *dbg_get_key_dump(const struct ubifs_info *c,
  239. const union ubifs_key *key);
  240. void dbg_dump_inode(const struct ubifs_info *c, const struct inode *inode);
  241. void dbg_dump_node(const struct ubifs_info *c, const void *node);
  242. void dbg_dump_lpt_node(const struct ubifs_info *c, void *node, int lnum,
  243. int offs);
  244. void dbg_dump_budget_req(const struct ubifs_budget_req *req);
  245. void dbg_dump_lstats(const struct ubifs_lp_stats *lst);
  246. void dbg_dump_budg(struct ubifs_info *c);
  247. void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp);
  248. void dbg_dump_lprops(struct ubifs_info *c);
  249. void dbg_dump_lpt_info(struct ubifs_info *c);
  250. void dbg_dump_leb(const struct ubifs_info *c, int lnum);
  251. void dbg_dump_znode(const struct ubifs_info *c,
  252. const struct ubifs_znode *znode);
  253. void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
  254. void dbg_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
  255. struct ubifs_nnode *parent, int iip);
  256. void dbg_dump_tnc(struct ubifs_info *c);
  257. void dbg_dump_index(struct ubifs_info *c);
  258. void dbg_dump_lpt_lebs(const struct ubifs_info *c);
  259. /* Checking helper functions */
  260. typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
  261. struct ubifs_zbranch *zbr, void *priv);
  262. typedef int (*dbg_znode_callback)(struct ubifs_info *c,
  263. struct ubifs_znode *znode, void *priv);
  264. int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
  265. dbg_znode_callback znode_cb, void *priv);
  266. /* Checking functions */
  267. void dbg_save_space_info(struct ubifs_info *c);
  268. int dbg_check_space_info(struct ubifs_info *c);
  269. int dbg_check_lprops(struct ubifs_info *c);
  270. int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot);
  271. int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot);
  272. int dbg_check_cats(struct ubifs_info *c);
  273. int dbg_check_ltab(struct ubifs_info *c);
  274. int dbg_chk_lpt_free_spc(struct ubifs_info *c);
  275. int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
  276. int dbg_check_synced_i_size(struct inode *inode);
  277. int dbg_check_dir_size(struct ubifs_info *c, const struct inode *dir);
  278. int dbg_check_tnc(struct ubifs_info *c, int extra);
  279. int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
  280. int dbg_check_filesystem(struct ubifs_info *c);
  281. void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
  282. int add_pos);
  283. int dbg_check_lprops(struct ubifs_info *c);
  284. int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
  285. int row, int col);
  286. /* Force the use of in-the-gaps method for testing */
  287. #define dbg_force_in_the_gaps_enabled \
  288. (ubifs_tst_flags & UBIFS_TST_FORCE_IN_THE_GAPS)
  289. int dbg_force_in_the_gaps(void);
  290. /* Failure mode for recovery testing */
  291. #define dbg_failure_mode (ubifs_tst_flags & UBIFS_TST_RCVRY)
  292. #ifndef UBIFS_DBG_PRESERVE_UBI
  293. #define ubi_leb_read dbg_leb_read
  294. #define ubi_leb_write dbg_leb_write
  295. #define ubi_leb_change dbg_leb_change
  296. #define ubi_leb_erase dbg_leb_erase
  297. #define ubi_leb_unmap dbg_leb_unmap
  298. #define ubi_is_mapped dbg_is_mapped
  299. #define ubi_leb_map dbg_leb_map
  300. #endif
  301. int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
  302. int len, int check);
  303. int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
  304. int offset, int len, int dtype);
  305. int dbg_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
  306. int len, int dtype);
  307. int dbg_leb_erase(struct ubi_volume_desc *desc, int lnum);
  308. int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum);
  309. int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum);
  310. int dbg_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype);
  311. static inline int dbg_read(struct ubi_volume_desc *desc, int lnum, char *buf,
  312. int offset, int len)
  313. {
  314. return dbg_leb_read(desc, lnum, buf, offset, len, 0);
  315. }
  316. static inline int dbg_write(struct ubi_volume_desc *desc, int lnum,
  317. const void *buf, int offset, int len)
  318. {
  319. return dbg_leb_write(desc, lnum, buf, offset, len, UBI_UNKNOWN);
  320. }
  321. static inline int dbg_change(struct ubi_volume_desc *desc, int lnum,
  322. const void *buf, int len)
  323. {
  324. return dbg_leb_change(desc, lnum, buf, len, UBI_UNKNOWN);
  325. }
  326. /* Debugfs-related stuff */
  327. int dbg_debugfs_init(void);
  328. void dbg_debugfs_exit(void);
  329. int dbg_debugfs_init_fs(struct ubifs_info *c);
  330. void dbg_debugfs_exit_fs(struct ubifs_info *c);
  331. #else /* !CONFIG_UBIFS_FS_DEBUG */
  332. /* Use "if (0)" to make compiler check arguments even if debugging is off */
  333. #define ubifs_assert(expr) do { \
  334. if (0 && (expr)) \
  335. printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
  336. __func__, __LINE__, current->pid); \
  337. } while (0)
  338. #define dbg_err(fmt, ...) do { \
  339. if (0) \
  340. ubifs_err(fmt, ##__VA_ARGS__); \
  341. } while (0)
  342. #define dbg_msg(fmt, ...) do { \
  343. if (0) \
  344. printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", \
  345. current->pid, __func__, ##__VA_ARGS__); \
  346. } while (0)
  347. #define dbg_dump_stack()
  348. #define ubifs_assert_cmt_locked(c)
  349. #define dbg_gen(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  350. #define dbg_jnl(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  351. #define dbg_tnc(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  352. #define dbg_lp(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  353. #define dbg_find(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  354. #define dbg_mnt(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  355. #define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  356. #define dbg_cmt(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  357. #define dbg_budg(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  358. #define dbg_log(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  359. #define dbg_gc(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  360. #define dbg_scan(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  361. #define dbg_rcvry(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
  362. #define DBGKEY(key) ((char *)(key))
  363. #define DBGKEY1(key) ((char *)(key))
  364. #define ubifs_debugging_init(c) 0
  365. #define ubifs_debugging_exit(c) ({})
  366. #define dbg_ntype(type) ""
  367. #define dbg_cstate(cmt_state) ""
  368. #define dbg_get_key_dump(c, key) ({})
  369. #define dbg_dump_inode(c, inode) ({})
  370. #define dbg_dump_node(c, node) ({})
  371. #define dbg_dump_lpt_node(c, node, lnum, offs) ({})
  372. #define dbg_dump_budget_req(req) ({})
  373. #define dbg_dump_lstats(lst) ({})
  374. #define dbg_dump_budg(c) ({})
  375. #define dbg_dump_lprop(c, lp) ({})
  376. #define dbg_dump_lprops(c) ({})
  377. #define dbg_dump_lpt_info(c) ({})
  378. #define dbg_dump_leb(c, lnum) ({})
  379. #define dbg_dump_znode(c, znode) ({})
  380. #define dbg_dump_heap(c, heap, cat) ({})
  381. #define dbg_dump_pnode(c, pnode, parent, iip) ({})
  382. #define dbg_dump_tnc(c) ({})
  383. #define dbg_dump_index(c) ({})
  384. #define dbg_dump_lpt_lebs(c) ({})
  385. #define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0
  386. #define dbg_old_index_check_init(c, zroot) 0
  387. #define dbg_save_space_info(c) ({})
  388. #define dbg_check_space_info(c) 0
  389. #define dbg_check_old_index(c, zroot) 0
  390. #define dbg_check_cats(c) 0
  391. #define dbg_check_ltab(c) 0
  392. #define dbg_chk_lpt_free_spc(c) 0
  393. #define dbg_chk_lpt_sz(c, action, len) 0
  394. #define dbg_check_synced_i_size(inode) 0
  395. #define dbg_check_dir_size(c, dir) 0
  396. #define dbg_check_tnc(c, x) 0
  397. #define dbg_check_idx_size(c, idx_size) 0
  398. #define dbg_check_filesystem(c) 0
  399. #define dbg_check_heap(c, heap, cat, add_pos) ({})
  400. #define dbg_check_lprops(c) 0
  401. #define dbg_check_lpt_nodes(c, cnode, row, col) 0
  402. #define dbg_force_in_the_gaps_enabled 0
  403. #define dbg_force_in_the_gaps() 0
  404. #define dbg_failure_mode 0
  405. #define dbg_debugfs_init() 0
  406. #define dbg_debugfs_exit()
  407. #define dbg_debugfs_init_fs(c) 0
  408. #define dbg_debugfs_exit_fs(c) 0
  409. #endif /* !CONFIG_UBIFS_FS_DEBUG */
  410. #endif /* !__UBIFS_DEBUG_H__ */