blob: d6ea1362d56ad22ed7f40e3dab85a8a42d81989d [file] [log] [blame]
Artem Bityutskiy1e517642008-07-14 19:08:37 +03001/*
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#ifdef CONFIG_UBIFS_FS_DEBUG
27
Artem Bityutskiy17c2f9f2008-10-17 13:31:39 +030028/**
29 * ubifs_debug_info - per-FS debugging information.
30 * @buf: a buffer of LEB size, used for various purposes
31 * @old_zroot: old index root - used by 'dbg_check_old_index()'
32 * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
33 * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
34 * @failure_mode: failure mode for recovery testing
35 * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
36 * @fail_timeout: time in jiffies when delay of failure mode expires
37 * @fail_cnt: current number of calls to failure mode I/O functions
38 * @fail_cnt_max: number of calls by which to delay failure mode
39 * @chk_lpt_sz: used by LPT tree size checker
40 * @chk_lpt_sz2: used by LPT tree size checker
41 * @chk_lpt_wastage: used by LPT tree size checker
42 * @chk_lpt_lebs: used by LPT tree size checker
43 * @new_nhead_offs: used by LPT tree size checker
44 * @new_ihead_lnum: used by debugging to check ihead_lnum
45 * @new_ihead_offs: used by debugging to check ihead_offs
46 */
47struct ubifs_debug_info {
48 void *buf;
49 struct ubifs_zbranch old_zroot;
50 int old_zroot_level;
51 unsigned long long old_zroot_sqnum;
52 int failure_mode;
53 int fail_delay;
54 unsigned long fail_timeout;
55 unsigned int fail_cnt;
56 unsigned int fail_cnt_max;
57 long long chk_lpt_sz;
58 long long chk_lpt_sz2;
59 long long chk_lpt_wastage;
60 int chk_lpt_lebs;
61 int new_nhead_offs;
62 int new_ihead_lnum;
63 int new_ihead_offs;
64};
Artem Bityutskiy1e517642008-07-14 19:08:37 +030065
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +030066#define ubifs_assert(expr) do { \
Artem Bityutskiy1e517642008-07-14 19:08:37 +030067 if (unlikely(!(expr))) { \
68 printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
69 __func__, __LINE__, current->pid); \
70 dbg_dump_stack(); \
71 } \
72} while (0)
73
74#define ubifs_assert_cmt_locked(c) do { \
75 if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
76 up_write(&(c)->commit_sem); \
77 printk(KERN_CRIT "commit lock is not locked!\n"); \
78 ubifs_assert(0); \
79 } \
80} while (0)
81
82#define dbg_dump_stack() do { \
83 if (!dbg_failure_mode) \
84 dump_stack(); \
85} while (0)
86
87/* Generic debugging messages */
88#define dbg_msg(fmt, ...) do { \
89 spin_lock(&dbg_lock); \
90 printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid, \
91 __func__, ##__VA_ARGS__); \
92 spin_unlock(&dbg_lock); \
93} while (0)
94
95#define dbg_do_msg(typ, fmt, ...) do { \
96 if (ubifs_msg_flags & typ) \
97 dbg_msg(fmt, ##__VA_ARGS__); \
98} while (0)
99
100#define dbg_err(fmt, ...) do { \
101 spin_lock(&dbg_lock); \
102 ubifs_err(fmt, ##__VA_ARGS__); \
103 spin_unlock(&dbg_lock); \
104} while (0)
105
106const char *dbg_key_str0(const struct ubifs_info *c,
107 const union ubifs_key *key);
108const char *dbg_key_str1(const struct ubifs_info *c,
109 const union ubifs_key *key);
110
111/*
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300112 * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300113 * macros.
114 */
115#define DBGKEY(key) dbg_key_str0(c, (key))
116#define DBGKEY1(key) dbg_key_str1(c, (key))
117
118/* General messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300119#define dbg_gen(fmt, ...) dbg_do_msg(UBIFS_MSG_GEN, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300120
121/* Additional journal messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300122#define dbg_jnl(fmt, ...) dbg_do_msg(UBIFS_MSG_JNL, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300123
124/* Additional TNC messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300125#define dbg_tnc(fmt, ...) dbg_do_msg(UBIFS_MSG_TNC, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300126
127/* Additional lprops messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300128#define dbg_lp(fmt, ...) dbg_do_msg(UBIFS_MSG_LP, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300129
130/* Additional LEB find messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300131#define dbg_find(fmt, ...) dbg_do_msg(UBIFS_MSG_FIND, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300132
133/* Additional mount messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300134#define dbg_mnt(fmt, ...) dbg_do_msg(UBIFS_MSG_MNT, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300135
136/* Additional I/O messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300137#define dbg_io(fmt, ...) dbg_do_msg(UBIFS_MSG_IO, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300138
139/* Additional commit messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300140#define dbg_cmt(fmt, ...) dbg_do_msg(UBIFS_MSG_CMT, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300141
142/* Additional budgeting messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300143#define dbg_budg(fmt, ...) dbg_do_msg(UBIFS_MSG_BUDG, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300144
145/* Additional log messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300146#define dbg_log(fmt, ...) dbg_do_msg(UBIFS_MSG_LOG, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300147
148/* Additional gc messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300149#define dbg_gc(fmt, ...) dbg_do_msg(UBIFS_MSG_GC, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300150
151/* Additional scan messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300152#define dbg_scan(fmt, ...) dbg_do_msg(UBIFS_MSG_SCAN, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300153
154/* Additional recovery messages */
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300155#define dbg_rcvry(fmt, ...) dbg_do_msg(UBIFS_MSG_RCVRY, fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300156
157/*
158 * Debugging message type flags (must match msg_type_names in debug.c).
159 *
160 * UBIFS_MSG_GEN: general messages
161 * UBIFS_MSG_JNL: journal messages
162 * UBIFS_MSG_MNT: mount messages
163 * UBIFS_MSG_CMT: commit messages
164 * UBIFS_MSG_FIND: LEB find messages
165 * UBIFS_MSG_BUDG: budgeting messages
166 * UBIFS_MSG_GC: garbage collection messages
167 * UBIFS_MSG_TNC: TNC messages
168 * UBIFS_MSG_LP: lprops messages
169 * UBIFS_MSG_IO: I/O messages
170 * UBIFS_MSG_LOG: log messages
171 * UBIFS_MSG_SCAN: scan messages
172 * UBIFS_MSG_RCVRY: recovery messages
173 */
174enum {
175 UBIFS_MSG_GEN = 0x1,
176 UBIFS_MSG_JNL = 0x2,
177 UBIFS_MSG_MNT = 0x4,
178 UBIFS_MSG_CMT = 0x8,
179 UBIFS_MSG_FIND = 0x10,
180 UBIFS_MSG_BUDG = 0x20,
181 UBIFS_MSG_GC = 0x40,
182 UBIFS_MSG_TNC = 0x80,
183 UBIFS_MSG_LP = 0x100,
184 UBIFS_MSG_IO = 0x200,
185 UBIFS_MSG_LOG = 0x400,
186 UBIFS_MSG_SCAN = 0x800,
187 UBIFS_MSG_RCVRY = 0x1000,
188};
189
190/* Debugging message type flags for each default debug message level */
191#define UBIFS_MSG_LVL_0 0
192#define UBIFS_MSG_LVL_1 0x1
193#define UBIFS_MSG_LVL_2 0x7f
194#define UBIFS_MSG_LVL_3 0xffff
195
196/*
197 * Debugging check flags (must match chk_names in debug.c).
198 *
199 * UBIFS_CHK_GEN: general checks
200 * UBIFS_CHK_TNC: check TNC
201 * UBIFS_CHK_IDX_SZ: check index size
202 * UBIFS_CHK_ORPH: check orphans
203 * UBIFS_CHK_OLD_IDX: check the old index
204 * UBIFS_CHK_LPROPS: check lprops
205 * UBIFS_CHK_FS: check the file-system
206 */
207enum {
208 UBIFS_CHK_GEN = 0x1,
209 UBIFS_CHK_TNC = 0x2,
210 UBIFS_CHK_IDX_SZ = 0x4,
211 UBIFS_CHK_ORPH = 0x8,
212 UBIFS_CHK_OLD_IDX = 0x10,
213 UBIFS_CHK_LPROPS = 0x20,
214 UBIFS_CHK_FS = 0x40,
215};
216
217/*
218 * Special testing flags (must match tst_names in debug.c).
219 *
220 * UBIFS_TST_FORCE_IN_THE_GAPS: force the use of in-the-gaps method
221 * UBIFS_TST_RCVRY: failure mode for recovery testing
222 */
223enum {
224 UBIFS_TST_FORCE_IN_THE_GAPS = 0x2,
225 UBIFS_TST_RCVRY = 0x4,
226};
227
228#if CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 1
229#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_1
230#elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 2
231#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_2
232#elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 3
233#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_3
234#else
235#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_0
236#endif
237
238#ifdef CONFIG_UBIFS_FS_DEBUG_CHKS
239#define UBIFS_CHK_FLAGS_DEFAULT 0xffffffff
240#else
241#define UBIFS_CHK_FLAGS_DEFAULT 0
242#endif
243
244extern spinlock_t dbg_lock;
245
246extern unsigned int ubifs_msg_flags;
247extern unsigned int ubifs_chk_flags;
248extern unsigned int ubifs_tst_flags;
249
Artem Bityutskiy17c2f9f2008-10-17 13:31:39 +0300250int ubifs_debugging_init(struct ubifs_info *c);
251void ubifs_debugging_exit(struct ubifs_info *c);
252
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300253/* Dump functions */
254
255const char *dbg_ntype(int type);
256const char *dbg_cstate(int cmt_state);
257const char *dbg_get_key_dump(const struct ubifs_info *c,
258 const union ubifs_key *key);
259void dbg_dump_inode(const struct ubifs_info *c, const struct inode *inode);
260void dbg_dump_node(const struct ubifs_info *c, const void *node);
261void dbg_dump_budget_req(const struct ubifs_budget_req *req);
262void dbg_dump_lstats(const struct ubifs_lp_stats *lst);
263void dbg_dump_budg(struct ubifs_info *c);
264void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp);
265void dbg_dump_lprops(struct ubifs_info *c);
Adrian Hunter73944a62008-09-12 18:13:31 +0300266void dbg_dump_lpt_info(struct ubifs_info *c);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300267void dbg_dump_leb(const struct ubifs_info *c, int lnum);
268void dbg_dump_znode(const struct ubifs_info *c,
269 const struct ubifs_znode *znode);
270void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
271void dbg_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
272 struct ubifs_nnode *parent, int iip);
273void dbg_dump_tnc(struct ubifs_info *c);
274void dbg_dump_index(struct ubifs_info *c);
275
276/* Checking helper functions */
277
278typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
279 struct ubifs_zbranch *zbr, void *priv);
280typedef int (*dbg_znode_callback)(struct ubifs_info *c,
281 struct ubifs_znode *znode, void *priv);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300282int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
283 dbg_znode_callback znode_cb, void *priv);
284
285/* Checking functions */
286
287int dbg_check_lprops(struct ubifs_info *c);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300288int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot);
289int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300290int dbg_check_cats(struct ubifs_info *c);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300291int dbg_check_ltab(struct ubifs_info *c);
Adrian Hunter73944a62008-09-12 18:13:31 +0300292int dbg_chk_lpt_free_spc(struct ubifs_info *c);
293int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300294int dbg_check_synced_i_size(struct inode *inode);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300295int dbg_check_dir_size(struct ubifs_info *c, const struct inode *dir);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300296int dbg_check_tnc(struct ubifs_info *c, int extra);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300297int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300298int dbg_check_filesystem(struct ubifs_info *c);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300299void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
300 int add_pos);
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300301int dbg_check_lprops(struct ubifs_info *c);
302int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
303 int row, int col);
304
305/* Force the use of in-the-gaps method for testing */
306
307#define dbg_force_in_the_gaps_enabled \
308 (ubifs_tst_flags & UBIFS_TST_FORCE_IN_THE_GAPS)
309
310int dbg_force_in_the_gaps(void);
311
312/* Failure mode for recovery testing */
313
314#define dbg_failure_mode (ubifs_tst_flags & UBIFS_TST_RCVRY)
315
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300316#ifndef UBIFS_DBG_PRESERVE_UBI
317
318#define ubi_leb_read dbg_leb_read
319#define ubi_leb_write dbg_leb_write
320#define ubi_leb_change dbg_leb_change
321#define ubi_leb_erase dbg_leb_erase
322#define ubi_leb_unmap dbg_leb_unmap
323#define ubi_is_mapped dbg_is_mapped
324#define ubi_leb_map dbg_leb_map
325
326#endif
327
328int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
329 int len, int check);
330int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
331 int offset, int len, int dtype);
332int dbg_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
333 int len, int dtype);
334int dbg_leb_erase(struct ubi_volume_desc *desc, int lnum);
335int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum);
336int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum);
337int dbg_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype);
338
339static inline int dbg_read(struct ubi_volume_desc *desc, int lnum, char *buf,
340 int offset, int len)
341{
342 return dbg_leb_read(desc, lnum, buf, offset, len, 0);
343}
344
345static inline int dbg_write(struct ubi_volume_desc *desc, int lnum,
346 const void *buf, int offset, int len)
347{
348 return dbg_leb_write(desc, lnum, buf, offset, len, UBI_UNKNOWN);
349}
350
351static inline int dbg_change(struct ubi_volume_desc *desc, int lnum,
352 const void *buf, int len)
353{
354 return dbg_leb_change(desc, lnum, buf, len, UBI_UNKNOWN);
355}
356
357#else /* !CONFIG_UBIFS_FS_DEBUG */
358
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300359/* Use "if (0)" to make compiler check arguments even if debugging is off */
360#define ubifs_assert(expr) do { \
361 if (0 && (expr)) \
362 printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
363 __func__, __LINE__, current->pid); \
364} while (0)
365
366#define dbg_err(fmt, ...) do { \
367 if (0) \
368 ubifs_err(fmt, ##__VA_ARGS__); \
369} while (0)
370
371#define dbg_msg(fmt, ...) do { \
372 if (0) \
373 printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", \
374 current->pid, __func__, ##__VA_ARGS__); \
375} while (0)
376
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300377#define dbg_dump_stack()
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300378#define ubifs_assert_cmt_locked(c)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300379
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300380#define dbg_gen(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
381#define dbg_jnl(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
382#define dbg_tnc(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
383#define dbg_lp(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
384#define dbg_find(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
385#define dbg_mnt(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
386#define dbg_io(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
387#define dbg_cmt(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
388#define dbg_budg(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
389#define dbg_log(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
390#define dbg_gc(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
391#define dbg_scan(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
392#define dbg_rcvry(fmt, ...) dbg_msg(fmt, ##__VA_ARGS__)
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300393
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300394#define DBGKEY(key) ((char *)(key))
395#define DBGKEY1(key) ((char *)(key))
396
Artem Bityutskiy17c2f9f2008-10-17 13:31:39 +0300397#define ubifs_debugging_init(c) 0
398#define ubifs_debugging_exit(c) ({})
399
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300400#define dbg_ntype(type) ""
401#define dbg_cstate(cmt_state) ""
402#define dbg_get_key_dump(c, key) ({})
403#define dbg_dump_inode(c, inode) ({})
404#define dbg_dump_node(c, node) ({})
405#define dbg_dump_budget_req(req) ({})
406#define dbg_dump_lstats(lst) ({})
407#define dbg_dump_budg(c) ({})
408#define dbg_dump_lprop(c, lp) ({})
409#define dbg_dump_lprops(c) ({})
Adrian Hunter73944a62008-09-12 18:13:31 +0300410#define dbg_dump_lpt_info(c) ({})
Artem Bityutskiy840dc6b2008-08-01 18:13:37 +0300411#define dbg_dump_leb(c, lnum) ({})
412#define dbg_dump_znode(c, znode) ({})
413#define dbg_dump_heap(c, heap, cat) ({})
414#define dbg_dump_pnode(c, pnode, parent, iip) ({})
415#define dbg_dump_tnc(c) ({})
416#define dbg_dump_index(c) ({})
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300417
418#define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300419#define dbg_old_index_check_init(c, zroot) 0
420#define dbg_check_old_index(c, zroot) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300421#define dbg_check_cats(c) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300422#define dbg_check_ltab(c) 0
Adrian Hunter73944a62008-09-12 18:13:31 +0300423#define dbg_chk_lpt_free_spc(c) 0
424#define dbg_chk_lpt_sz(c, action, len) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300425#define dbg_check_synced_i_size(inode) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300426#define dbg_check_dir_size(c, dir) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300427#define dbg_check_tnc(c, x) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300428#define dbg_check_idx_size(c, idx_size) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300429#define dbg_check_filesystem(c) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300430#define dbg_check_heap(c, heap, cat, add_pos) ({})
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300431#define dbg_check_lprops(c) 0
432#define dbg_check_lpt_nodes(c, cnode, row, col) 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300433#define dbg_force_in_the_gaps_enabled 0
434#define dbg_force_in_the_gaps() 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300435#define dbg_failure_mode 0
Artem Bityutskiy1e517642008-07-14 19:08:37 +0300436
437#endif /* !CONFIG_UBIFS_FS_DEBUG */
438
439#endif /* !__UBIFS_DEBUG_H__ */