debug.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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. /* Checking helper functions */
  25. typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
  26. struct ubifs_zbranch *zbr, void *priv);
  27. typedef int (*dbg_znode_callback)(struct ubifs_info *c,
  28. struct ubifs_znode *znode, void *priv);
  29. #ifdef CONFIG_UBIFS_FS_DEBUG
  30. #include <linux/random.h>
  31. /*
  32. * The UBIFS debugfs directory name pattern and maximum name length (3 for "ubi"
  33. * + 1 for "_" and plus 2x2 for 2 UBI numbers and 1 for the trailing zero byte.
  34. */
  35. #define UBIFS_DFS_DIR_NAME "ubi%d_%d"
  36. #define UBIFS_DFS_DIR_LEN (3 + 1 + 2*2 + 1)
  37. /**
  38. * ubifs_debug_info - per-FS debugging information.
  39. * @old_zroot: old index root - used by 'dbg_check_old_index()'
  40. * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
  41. * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
  42. * @failure_mode: failure mode for recovery testing
  43. * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
  44. * @fail_timeout: time in jiffies when delay of failure mode expires
  45. * @fail_cnt: current number of calls to failure mode I/O functions
  46. * @fail_cnt_max: number of calls by which to delay failure mode
  47. * @chk_lpt_sz: used by LPT tree size checker
  48. * @chk_lpt_sz2: used by LPT tree size checker
  49. * @chk_lpt_wastage: used by LPT tree size checker
  50. * @chk_lpt_lebs: used by LPT tree size checker
  51. * @new_nhead_offs: used by LPT tree size checker
  52. * @new_ihead_lnum: used by debugging to check @c->ihead_lnum
  53. * @new_ihead_offs: used by debugging to check @c->ihead_offs
  54. *
  55. * @saved_lst: saved lprops statistics (used by 'dbg_save_space_info()')
  56. * @saved_bi: saved budgeting information
  57. * @saved_free: saved amount of free space
  58. * @saved_idx_gc_cnt: saved value of @c->idx_gc_cnt
  59. *
  60. * @dfs_dir_name: name of debugfs directory containing this file-system's files
  61. * @dfs_dir: direntry object of the file-system debugfs directory
  62. * @dfs_dump_lprops: "dump lprops" debugfs knob
  63. * @dfs_dump_budg: "dump budgeting information" debugfs knob
  64. * @dfs_dump_tnc: "dump TNC" debugfs knob
  65. */
  66. struct ubifs_debug_info {
  67. struct ubifs_zbranch old_zroot;
  68. int old_zroot_level;
  69. unsigned long long old_zroot_sqnum;
  70. int failure_mode;
  71. int fail_delay;
  72. unsigned long fail_timeout;
  73. unsigned int fail_cnt;
  74. unsigned int fail_cnt_max;
  75. long long chk_lpt_sz;
  76. long long chk_lpt_sz2;
  77. long long chk_lpt_wastage;
  78. int chk_lpt_lebs;
  79. int new_nhead_offs;
  80. int new_ihead_lnum;
  81. int new_ihead_offs;
  82. struct ubifs_lp_stats saved_lst;
  83. struct ubifs_budg_info saved_bi;
  84. long long saved_free;
  85. int saved_idx_gc_cnt;
  86. char dfs_dir_name[UBIFS_DFS_DIR_LEN + 1];
  87. struct dentry *dfs_dir;
  88. struct dentry *dfs_dump_lprops;
  89. struct dentry *dfs_dump_budg;
  90. struct dentry *dfs_dump_tnc;
  91. };
  92. #define ubifs_assert(expr) do { \
  93. if (unlikely(!(expr))) { \
  94. printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
  95. __func__, __LINE__, current->pid); \
  96. dbg_dump_stack(); \
  97. } \
  98. } while (0)
  99. #define ubifs_assert_cmt_locked(c) do { \
  100. if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
  101. up_write(&(c)->commit_sem); \
  102. printk(KERN_CRIT "commit lock is not locked!\n"); \
  103. ubifs_assert(0); \
  104. } \
  105. } while (0)
  106. #define dbg_dump_stack() dump_stack()
  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. #define ubifs_dbg_msg(type, fmt, ...) do { \
  123. spin_lock(&dbg_lock); \
  124. pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__); \
  125. spin_unlock(&dbg_lock); \
  126. } while (0)
  127. /* Just a debugging messages not related to any specific UBIFS subsystem */
  128. #define dbg_msg(fmt, ...) ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__)
  129. /* General messages */
  130. #define dbg_gen(fmt, ...) ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__)
  131. /* Additional journal messages */
  132. #define dbg_jnl(fmt, ...) ubifs_dbg_msg("jnl", fmt, ##__VA_ARGS__)
  133. /* Additional TNC messages */
  134. #define dbg_tnc(fmt, ...) ubifs_dbg_msg("tnc", fmt, ##__VA_ARGS__)
  135. /* Additional lprops messages */
  136. #define dbg_lp(fmt, ...) ubifs_dbg_msg("lp", fmt, ##__VA_ARGS__)
  137. /* Additional LEB find messages */
  138. #define dbg_find(fmt, ...) ubifs_dbg_msg("find", fmt, ##__VA_ARGS__)
  139. /* Additional mount messages */
  140. #define dbg_mnt(fmt, ...) ubifs_dbg_msg("mnt", fmt, ##__VA_ARGS__)
  141. /* Additional I/O messages */
  142. #define dbg_io(fmt, ...) ubifs_dbg_msg("io", fmt, ##__VA_ARGS__)
  143. /* Additional commit messages */
  144. #define dbg_cmt(fmt, ...) ubifs_dbg_msg("cmt", fmt, ##__VA_ARGS__)
  145. /* Additional budgeting messages */
  146. #define dbg_budg(fmt, ...) ubifs_dbg_msg("budg", fmt, ##__VA_ARGS__)
  147. /* Additional log messages */
  148. #define dbg_log(fmt, ...) ubifs_dbg_msg("log", fmt, ##__VA_ARGS__)
  149. /* Additional gc messages */
  150. #define dbg_gc(fmt, ...) ubifs_dbg_msg("gc", fmt, ##__VA_ARGS__)
  151. /* Additional scan messages */
  152. #define dbg_scan(fmt, ...) ubifs_dbg_msg("scan", fmt, ##__VA_ARGS__)
  153. /* Additional recovery messages */
  154. #define dbg_rcvry(fmt, ...) ubifs_dbg_msg("rcvry", fmt, ##__VA_ARGS__)
  155. /*
  156. * Debugging check flags.
  157. *
  158. * UBIFS_CHK_GEN: general checks
  159. * UBIFS_CHK_TNC: check TNC
  160. * UBIFS_CHK_IDX_SZ: check index size
  161. * UBIFS_CHK_ORPH: check orphans
  162. * UBIFS_CHK_OLD_IDX: check the old index
  163. * UBIFS_CHK_LPROPS: check lprops
  164. * UBIFS_CHK_FS: check the file-system
  165. */
  166. enum {
  167. UBIFS_CHK_GEN = 0x1,
  168. UBIFS_CHK_TNC = 0x2,
  169. UBIFS_CHK_IDX_SZ = 0x4,
  170. UBIFS_CHK_ORPH = 0x8,
  171. UBIFS_CHK_OLD_IDX = 0x10,
  172. UBIFS_CHK_LPROPS = 0x20,
  173. UBIFS_CHK_FS = 0x40,
  174. };
  175. /*
  176. * Special testing flags.
  177. *
  178. * UBIFS_TST_RCVRY: failure mode for recovery testing
  179. */
  180. enum {
  181. UBIFS_TST_RCVRY = 0x4,
  182. };
  183. extern spinlock_t dbg_lock;
  184. extern unsigned int ubifs_msg_flags;
  185. extern unsigned int ubifs_chk_flags;
  186. extern unsigned int ubifs_tst_flags;
  187. int ubifs_debugging_init(struct ubifs_info *c);
  188. void ubifs_debugging_exit(struct ubifs_info *c);
  189. /* Dump functions */
  190. const char *dbg_ntype(int type);
  191. const char *dbg_cstate(int cmt_state);
  192. const char *dbg_jhead(int jhead);
  193. const char *dbg_get_key_dump(const struct ubifs_info *c,
  194. const union ubifs_key *key);
  195. void dbg_dump_inode(struct ubifs_info *c, const struct inode *inode);
  196. void dbg_dump_node(const struct ubifs_info *c, const void *node);
  197. void dbg_dump_lpt_node(const struct ubifs_info *c, void *node, int lnum,
  198. int offs);
  199. void dbg_dump_budget_req(const struct ubifs_budget_req *req);
  200. void dbg_dump_lstats(const struct ubifs_lp_stats *lst);
  201. void dbg_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi);
  202. void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp);
  203. void dbg_dump_lprops(struct ubifs_info *c);
  204. void dbg_dump_lpt_info(struct ubifs_info *c);
  205. void dbg_dump_leb(const struct ubifs_info *c, int lnum);
  206. void dbg_dump_znode(const struct ubifs_info *c,
  207. const struct ubifs_znode *znode);
  208. void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
  209. void dbg_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
  210. struct ubifs_nnode *parent, int iip);
  211. void dbg_dump_tnc(struct ubifs_info *c);
  212. void dbg_dump_index(struct ubifs_info *c);
  213. void dbg_dump_lpt_lebs(const struct ubifs_info *c);
  214. int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
  215. dbg_znode_callback znode_cb, void *priv);
  216. /* Checking functions */
  217. void dbg_save_space_info(struct ubifs_info *c);
  218. int dbg_check_space_info(struct ubifs_info *c);
  219. int dbg_check_lprops(struct ubifs_info *c);
  220. int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot);
  221. int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot);
  222. int dbg_check_cats(struct ubifs_info *c);
  223. int dbg_check_ltab(struct ubifs_info *c);
  224. int dbg_chk_lpt_free_spc(struct ubifs_info *c);
  225. int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
  226. int dbg_check_synced_i_size(struct inode *inode);
  227. int dbg_check_dir(struct ubifs_info *c, const struct inode *dir);
  228. int dbg_check_tnc(struct ubifs_info *c, int extra);
  229. int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
  230. int dbg_check_filesystem(struct ubifs_info *c);
  231. void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
  232. int add_pos);
  233. int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
  234. int row, int col);
  235. int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
  236. loff_t size);
  237. int dbg_check_data_nodes_order(struct ubifs_info *c, struct list_head *head);
  238. int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head);
  239. /* Force the use of in-the-gaps method for testing */
  240. static inline int dbg_force_in_the_gaps_enabled(void)
  241. {
  242. return ubifs_chk_flags & UBIFS_CHK_GEN;
  243. }
  244. int dbg_force_in_the_gaps(void);
  245. /* Failure mode for recovery testing */
  246. #define dbg_failure_mode (ubifs_tst_flags & UBIFS_TST_RCVRY)
  247. #ifndef UBIFS_DBG_PRESERVE_UBI
  248. #define ubi_leb_read dbg_leb_read
  249. #define ubi_leb_write dbg_leb_write
  250. #define ubi_leb_change dbg_leb_change
  251. #define ubi_leb_erase dbg_leb_erase
  252. #define ubi_leb_unmap dbg_leb_unmap
  253. #define ubi_is_mapped dbg_is_mapped
  254. #define ubi_leb_map dbg_leb_map
  255. #endif
  256. int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
  257. int len, int check);
  258. int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
  259. int offset, int len, int dtype);
  260. int dbg_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
  261. int len, int dtype);
  262. int dbg_leb_erase(struct ubi_volume_desc *desc, int lnum);
  263. int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum);
  264. int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum);
  265. int dbg_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype);
  266. static inline int dbg_read(struct ubi_volume_desc *desc, int lnum, char *buf,
  267. int offset, int len)
  268. {
  269. return dbg_leb_read(desc, lnum, buf, offset, len, 0);
  270. }
  271. static inline int dbg_write(struct ubi_volume_desc *desc, int lnum,
  272. const void *buf, int offset, int len)
  273. {
  274. return dbg_leb_write(desc, lnum, buf, offset, len, UBI_UNKNOWN);
  275. }
  276. static inline int dbg_change(struct ubi_volume_desc *desc, int lnum,
  277. const void *buf, int len)
  278. {
  279. return dbg_leb_change(desc, lnum, buf, len, UBI_UNKNOWN);
  280. }
  281. /* Debugfs-related stuff */
  282. int dbg_debugfs_init(void);
  283. void dbg_debugfs_exit(void);
  284. int dbg_debugfs_init_fs(struct ubifs_info *c);
  285. void dbg_debugfs_exit_fs(struct ubifs_info *c);
  286. #else /* !CONFIG_UBIFS_FS_DEBUG */
  287. /* Use "if (0)" to make compiler check arguments even if debugging is off */
  288. #define ubifs_assert(expr) do { \
  289. if (0) \
  290. printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
  291. __func__, __LINE__, current->pid); \
  292. } while (0)
  293. #define dbg_err(fmt, ...) do { \
  294. if (0) \
  295. ubifs_err(fmt, ##__VA_ARGS__); \
  296. } while (0)
  297. #define ubifs_dbg_msg(fmt, ...) do { \
  298. if (0) \
  299. pr_debug(fmt "\n", ##__VA_ARGS__); \
  300. } while (0)
  301. #define dbg_dump_stack()
  302. #define ubifs_assert_cmt_locked(c)
  303. #define dbg_msg(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  304. #define dbg_gen(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  305. #define dbg_jnl(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  306. #define dbg_tnc(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  307. #define dbg_lp(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  308. #define dbg_find(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  309. #define dbg_mnt(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  310. #define dbg_io(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  311. #define dbg_cmt(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  312. #define dbg_budg(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  313. #define dbg_log(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  314. #define dbg_gc(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  315. #define dbg_scan(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  316. #define dbg_rcvry(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
  317. #define DBGKEY(key) ((char *)(key))
  318. #define DBGKEY1(key) ((char *)(key))
  319. static inline int ubifs_debugging_init(struct ubifs_info *c) { return 0; }
  320. static inline void ubifs_debugging_exit(struct ubifs_info *c) { return; }
  321. static inline const char *dbg_ntype(int type) { return ""; }
  322. static inline const char *dbg_cstate(int cmt_state) { return ""; }
  323. static inline const char *dbg_jhead(int jhead) { return ""; }
  324. static inline const char *
  325. dbg_get_key_dump(const struct ubifs_info *c,
  326. const union ubifs_key *key) { return ""; }
  327. static inline void dbg_dump_inode(struct ubifs_info *c,
  328. const struct inode *inode) { return; }
  329. static inline void dbg_dump_node(const struct ubifs_info *c,
  330. const void *node) { return; }
  331. static inline void dbg_dump_lpt_node(const struct ubifs_info *c,
  332. void *node, int lnum,
  333. int offs) { return; }
  334. static inline void
  335. dbg_dump_budget_req(const struct ubifs_budget_req *req) { return; }
  336. static inline void
  337. dbg_dump_lstats(const struct ubifs_lp_stats *lst) { return; }
  338. static inline void
  339. dbg_dump_budg(struct ubifs_info *c,
  340. const struct ubifs_budg_info *bi) { return; }
  341. static inline void dbg_dump_lprop(const struct ubifs_info *c,
  342. const struct ubifs_lprops *lp) { return; }
  343. static inline void dbg_dump_lprops(struct ubifs_info *c) { return; }
  344. static inline void dbg_dump_lpt_info(struct ubifs_info *c) { return; }
  345. static inline void dbg_dump_leb(const struct ubifs_info *c,
  346. int lnum) { return; }
  347. static inline void
  348. dbg_dump_znode(const struct ubifs_info *c,
  349. const struct ubifs_znode *znode) { return; }
  350. static inline void dbg_dump_heap(struct ubifs_info *c,
  351. struct ubifs_lpt_heap *heap,
  352. int cat) { return; }
  353. static inline void dbg_dump_pnode(struct ubifs_info *c,
  354. struct ubifs_pnode *pnode,
  355. struct ubifs_nnode *parent,
  356. int iip) { return; }
  357. static inline void dbg_dump_tnc(struct ubifs_info *c) { return; }
  358. static inline void dbg_dump_index(struct ubifs_info *c) { return; }
  359. static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c) { return; }
  360. static inline int dbg_walk_index(struct ubifs_info *c,
  361. dbg_leaf_callback leaf_cb,
  362. dbg_znode_callback znode_cb,
  363. void *priv) { return 0; }
  364. static inline void dbg_save_space_info(struct ubifs_info *c) { return; }
  365. static inline int dbg_check_space_info(struct ubifs_info *c) { return 0; }
  366. static inline int dbg_check_lprops(struct ubifs_info *c) { return 0; }
  367. static inline int
  368. dbg_old_index_check_init(struct ubifs_info *c,
  369. struct ubifs_zbranch *zroot) { return 0; }
  370. static inline int
  371. dbg_check_old_index(struct ubifs_info *c,
  372. struct ubifs_zbranch *zroot) { return 0; }
  373. static inline int dbg_check_cats(struct ubifs_info *c) { return 0; }
  374. static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; }
  375. static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; }
  376. static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
  377. int action, int len) { return 0; }
  378. static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; }
  379. static inline int dbg_check_dir(struct ubifs_info *c,
  380. const struct inode *dir) { return 0; }
  381. static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; }
  382. static inline int dbg_check_idx_size(struct ubifs_info *c,
  383. long long idx_size) { return 0; }
  384. static inline int dbg_check_filesystem(struct ubifs_info *c) { return 0; }
  385. static inline void dbg_check_heap(struct ubifs_info *c,
  386. struct ubifs_lpt_heap *heap,
  387. int cat, int add_pos) { return; }
  388. static inline int dbg_check_lpt_nodes(struct ubifs_info *c,
  389. struct ubifs_cnode *cnode, int row, int col) { return 0; }
  390. static inline int dbg_check_inode_size(struct ubifs_info *c,
  391. const struct inode *inode,
  392. loff_t size) { return 0; }
  393. static inline int
  394. dbg_check_data_nodes_order(struct ubifs_info *c,
  395. struct list_head *head) { return 0; }
  396. static inline int
  397. dbg_check_nondata_nodes_order(struct ubifs_info *c,
  398. struct list_head *head) { return 0; }
  399. static inline int dbg_force_in_the_gaps(void) { return 0; }
  400. #define dbg_force_in_the_gaps_enabled() 0
  401. #define dbg_failure_mode 0
  402. static inline int dbg_debugfs_init(void) { return 0; }
  403. static inline void dbg_debugfs_exit(void) { return; }
  404. static inline int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; }
  405. static inline int dbg_debugfs_exit_fs(struct ubifs_info *c) { return 0; }
  406. #endif /* !CONFIG_UBIFS_FS_DEBUG */
  407. #endif /* !__UBIFS_DEBUG_H__ */