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