debug.h 19.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/*
 * This file is part of UBIFS.
 *
 * Copyright (C) 2006-2008 Nokia Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 51
 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * Authors: Artem Bityutskiy (Битюцкий Артём)
 *          Adrian Hunter
 */

#ifndef __UBIFS_DEBUG_H__
#define __UBIFS_DEBUG_H__

26 27 28 29 30 31
/* Checking helper functions */
typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
				 struct ubifs_zbranch *zbr, void *priv);
typedef int (*dbg_znode_callback)(struct ubifs_info *c,
				  struct ubifs_znode *znode, void *priv);

32 33
#ifdef CONFIG_UBIFS_FS_DEBUG

34 35 36 37 38 39 40
/*
 * The UBIFS debugfs directory name pattern and maximum name length (3 for "ubi"
 * + 1 for "_" and plus 2x2 for 2 UBI numbers and 1 for the trailing zero byte.
 */
#define UBIFS_DFS_DIR_NAME "ubi%d_%d"
#define UBIFS_DFS_DIR_LEN  (3 + 1 + 2*2 + 1)

41 42 43 44 45
/**
 * ubifs_debug_info - per-FS debugging information.
 * @old_zroot: old index root - used by 'dbg_check_old_index()'
 * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
 * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
46
 *
47 48 49 50 51
 * @failure_mode: failure mode for recovery testing
 * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
 * @fail_timeout: time in jiffies when delay of failure mode expires
 * @fail_cnt: current number of calls to failure mode I/O functions
 * @fail_cnt_max: number of calls by which to delay failure mode
52
 *
53 54 55 56 57
 * @chk_lpt_sz: used by LPT tree size checker
 * @chk_lpt_sz2: used by LPT tree size checker
 * @chk_lpt_wastage: used by LPT tree size checker
 * @chk_lpt_lebs: used by LPT tree size checker
 * @new_nhead_offs: used by LPT tree size checker
58 59
 * @new_ihead_lnum: used by debugging to check @c->ihead_lnum
 * @new_ihead_offs: used by debugging to check @c->ihead_offs
A
Artem Bityutskiy 已提交
60
 *
61
 * @saved_lst: saved lprops statistics (used by 'dbg_save_space_info()')
62 63 64
 * @saved_bi: saved budgeting information
 * @saved_free: saved amount of free space
 * @saved_idx_gc_cnt: saved value of @c->idx_gc_cnt
65
 *
66 67 68 69 70 71 72
 * @chk_gen: if general extra checks are enabled
 * @chk_index: if index xtra checks are enabled
 * @chk_orph: if orphans extra checks are enabled
 * @chk_lprops: if lprops extra checks are enabled
 * @chk_fs: if UBIFS contents extra checks are enabled
 * @tst_rcvry: if UBIFS recovery testing mode enabled
 *
73 74 75 76 77
 * @dfs_dir_name: name of debugfs directory containing this file-system's files
 * @dfs_dir: direntry object of the file-system debugfs directory
 * @dfs_dump_lprops: "dump lprops" debugfs knob
 * @dfs_dump_budg: "dump budgeting information" debugfs knob
 * @dfs_dump_tnc: "dump TNC" debugfs knob
78 79 80 81 82 83
 * @dfs_chk_gen: debugfs knob to enable UBIFS general extra checks
 * @dfs_chk_index: debugfs knob to enable UBIFS index extra checks
 * @dfs_chk_orph: debugfs knob to enable UBIFS orphans extra checks
 * @dfs_chk_lprops: debugfs knob to enable UBIFS LEP properties extra checks
 * @dfs_chk_fs: debugfs knob to enable UBIFS contents extra checks
 * @dfs_tst_rcvry: debugfs knob to enable UBIFS recovery testing
84 85 86 87 88
 */
struct ubifs_debug_info {
	struct ubifs_zbranch old_zroot;
	int old_zroot_level;
	unsigned long long old_zroot_sqnum;
89

90 91 92 93 94
	int failure_mode;
	int fail_delay;
	unsigned long fail_timeout;
	unsigned int fail_cnt;
	unsigned int fail_cnt_max;
95

96 97 98 99 100 101 102
	long long chk_lpt_sz;
	long long chk_lpt_sz2;
	long long chk_lpt_wastage;
	int chk_lpt_lebs;
	int new_nhead_offs;
	int new_ihead_lnum;
	int new_ihead_offs;
A
Artem Bityutskiy 已提交
103

104
	struct ubifs_lp_stats saved_lst;
105
	struct ubifs_budg_info saved_bi;
106
	long long saved_free;
107
	int saved_idx_gc_cnt;
108

109 110 111 112 113 114 115
	unsigned int chk_gen:1;
	unsigned int chk_index:1;
	unsigned int chk_orph:1;
	unsigned int chk_lprops:1;
	unsigned int chk_fs:1;
	unsigned int tst_rcvry:1;

116
	char dfs_dir_name[UBIFS_DFS_DIR_LEN + 1];
117 118 119 120
	struct dentry *dfs_dir;
	struct dentry *dfs_dump_lprops;
	struct dentry *dfs_dump_budg;
	struct dentry *dfs_dump_tnc;
121 122 123 124 125 126
	struct dentry *dfs_chk_gen;
	struct dentry *dfs_chk_index;
	struct dentry *dfs_chk_orph;
	struct dentry *dfs_chk_lprops;
	struct dentry *dfs_chk_fs;
	struct dentry *dfs_tst_rcvry;
127
};
128

129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
/**
 * ubifs_global_debug_info - global (not per-FS) UBIFS debugging information.
 *
 * @chk_gen: if general extra checks are enabled
 * @chk_index: if index xtra checks are enabled
 * @chk_orph: if orphans extra checks are enabled
 * @chk_lprops: if lprops extra checks are enabled
 * @chk_fs: if UBIFS contents extra checks are enabled
 * @tst_rcvry: if UBIFS recovery testing mode enabled
 */
struct ubifs_global_debug_info {
	unsigned int chk_gen:1;
	unsigned int chk_index:1;
	unsigned int chk_orph:1;
	unsigned int chk_lprops:1;
	unsigned int chk_fs:1;
	unsigned int tst_rcvry:1;
};

148
#define ubifs_assert(expr) do {                                                \
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
	if (unlikely(!(expr))) {                                               \
		printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
		       __func__, __LINE__, current->pid);                      \
		dbg_dump_stack();                                              \
	}                                                                      \
} while (0)

#define ubifs_assert_cmt_locked(c) do {                                        \
	if (unlikely(down_write_trylock(&(c)->commit_sem))) {                  \
		up_write(&(c)->commit_sem);                                    \
		printk(KERN_CRIT "commit lock is not locked!\n");              \
		ubifs_assert(0);                                               \
	}                                                                      \
} while (0)

164
#define dbg_dump_stack() dump_stack()
165 166 167 168 169 170 171 172 173 174 175 176 177

#define dbg_err(fmt, ...) do {                                                 \
	spin_lock(&dbg_lock);                                                  \
	ubifs_err(fmt, ##__VA_ARGS__);                                         \
	spin_unlock(&dbg_lock);                                                \
} while (0)

const char *dbg_key_str0(const struct ubifs_info *c,
			 const union ubifs_key *key);
const char *dbg_key_str1(const struct ubifs_info *c,
			 const union ubifs_key *key);

/*
178
 * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message
179 180 181 182 183
 * macros.
 */
#define DBGKEY(key) dbg_key_str0(c, (key))
#define DBGKEY1(key) dbg_key_str1(c, (key))

184 185
extern spinlock_t dbg_lock;

186 187 188 189 190
#define ubifs_dbg_msg(type, fmt, ...) do {                        \
	spin_lock(&dbg_lock);                                     \
	pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__); \
	spin_unlock(&dbg_lock);                                   \
} while (0)
191

192 193 194 195
/* Just a debugging messages not related to any specific UBIFS subsystem */
#define dbg_msg(fmt, ...)   ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__)
/* General messages */
#define dbg_gen(fmt, ...)   ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__)
196
/* Additional journal messages */
197
#define dbg_jnl(fmt, ...)   ubifs_dbg_msg("jnl", fmt, ##__VA_ARGS__)
198
/* Additional TNC messages */
199
#define dbg_tnc(fmt, ...)   ubifs_dbg_msg("tnc", fmt, ##__VA_ARGS__)
200
/* Additional lprops messages */
201
#define dbg_lp(fmt, ...)    ubifs_dbg_msg("lp", fmt, ##__VA_ARGS__)
202
/* Additional LEB find messages */
203
#define dbg_find(fmt, ...)  ubifs_dbg_msg("find", fmt, ##__VA_ARGS__)
204
/* Additional mount messages */
205
#define dbg_mnt(fmt, ...)   ubifs_dbg_msg("mnt", fmt, ##__VA_ARGS__)
206
/* Additional I/O messages */
207
#define dbg_io(fmt, ...)    ubifs_dbg_msg("io", fmt, ##__VA_ARGS__)
208
/* Additional commit messages */
209
#define dbg_cmt(fmt, ...)   ubifs_dbg_msg("cmt", fmt, ##__VA_ARGS__)
210
/* Additional budgeting messages */
211
#define dbg_budg(fmt, ...)  ubifs_dbg_msg("budg", fmt, ##__VA_ARGS__)
212
/* Additional log messages */
213
#define dbg_log(fmt, ...)   ubifs_dbg_msg("log", fmt, ##__VA_ARGS__)
214
/* Additional gc messages */
215
#define dbg_gc(fmt, ...)    ubifs_dbg_msg("gc", fmt, ##__VA_ARGS__)
216
/* Additional scan messages */
217
#define dbg_scan(fmt, ...)  ubifs_dbg_msg("scan", fmt, ##__VA_ARGS__)
218
/* Additional recovery messages */
219
#define dbg_rcvry(fmt, ...) ubifs_dbg_msg("rcvry", fmt, ##__VA_ARGS__)
220

221
extern struct ubifs_global_debug_info ubifs_dbg;
222 223 224

static inline int dbg_is_chk_gen(const struct ubifs_info *c)
{
225
	return !!(ubifs_dbg.chk_gen || c->dbg->chk_gen);
226
}
227
static inline int dbg_is_chk_index(const struct ubifs_info *c)
228
{
229
	return !!(ubifs_dbg.chk_index || c->dbg->chk_index);
230 231 232
}
static inline int dbg_is_chk_orph(const struct ubifs_info *c)
{
233
	return !!(ubifs_dbg.chk_orph || c->dbg->chk_orph);
234 235 236
}
static inline int dbg_is_chk_lprops(const struct ubifs_info *c)
{
237
	return !!(ubifs_dbg.chk_lprops || c->dbg->chk_lprops);
238 239 240
}
static inline int dbg_is_chk_fs(const struct ubifs_info *c)
{
241
	return !!(ubifs_dbg.chk_fs || c->dbg->chk_fs);
242 243 244
}
static inline int dbg_is_tst_rcvry(const struct ubifs_info *c)
{
245
	return !!(ubifs_dbg.tst_rcvry || c->dbg->tst_rcvry);
246
}
247 248 249 250
static inline int dbg_is_power_cut(const struct ubifs_info *c)
{
	return !!c->dbg->failure_mode;
}
251

252 253 254
int ubifs_debugging_init(struct ubifs_info *c);
void ubifs_debugging_exit(struct ubifs_info *c);

255 256 257
/* Dump functions */
const char *dbg_ntype(int type);
const char *dbg_cstate(int cmt_state);
258
const char *dbg_jhead(int jhead);
259 260
const char *dbg_get_key_dump(const struct ubifs_info *c,
			     const union ubifs_key *key);
261
void dbg_dump_inode(struct ubifs_info *c, const struct inode *inode);
262
void dbg_dump_node(const struct ubifs_info *c, const void *node);
263 264
void dbg_dump_lpt_node(const struct ubifs_info *c, void *node, int lnum,
		       int offs);
265 266
void dbg_dump_budget_req(const struct ubifs_budget_req *req);
void dbg_dump_lstats(const struct ubifs_lp_stats *lst);
267
void dbg_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi);
268 269
void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp);
void dbg_dump_lprops(struct ubifs_info *c);
270
void dbg_dump_lpt_info(struct ubifs_info *c);
271 272 273 274 275 276 277 278
void dbg_dump_leb(const struct ubifs_info *c, int lnum);
void dbg_dump_znode(const struct ubifs_info *c,
		    const struct ubifs_znode *znode);
void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
void dbg_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
		    struct ubifs_nnode *parent, int iip);
void dbg_dump_tnc(struct ubifs_info *c);
void dbg_dump_index(struct ubifs_info *c);
279
void dbg_dump_lpt_lebs(const struct ubifs_info *c);
280 281 282 283 284

int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
		   dbg_znode_callback znode_cb, void *priv);

/* Checking functions */
285 286
void dbg_save_space_info(struct ubifs_info *c);
int dbg_check_space_info(struct ubifs_info *c);
287 288 289 290 291
int dbg_check_lprops(struct ubifs_info *c);
int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot);
int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot);
int dbg_check_cats(struct ubifs_info *c);
int dbg_check_ltab(struct ubifs_info *c);
292 293
int dbg_chk_lpt_free_spc(struct ubifs_info *c);
int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
294
int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode);
295
int dbg_check_dir(struct ubifs_info *c, const struct inode *dir);
296 297 298 299 300 301 302
int dbg_check_tnc(struct ubifs_info *c, int extra);
int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
int dbg_check_filesystem(struct ubifs_info *c);
void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
		    int add_pos);
int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
			int row, int col);
303 304
int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
			 loff_t size);
305 306
int dbg_check_data_nodes_order(struct ubifs_info *c, struct list_head *head);
int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head);
307

308 309 310 311 312 313
int dbg_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs,
		  int len, int dtype);
int dbg_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len,
		   int dtype);
int dbg_leb_unmap(struct ubifs_info *c, int lnum);
int dbg_leb_map(struct ubifs_info *c, int lnum, int dtype);
314

A
Artem Bityutskiy 已提交
315 316 317 318 319 320
/* Debugfs-related stuff */
int dbg_debugfs_init(void);
void dbg_debugfs_exit(void);
int dbg_debugfs_init_fs(struct ubifs_info *c);
void dbg_debugfs_exit_fs(struct ubifs_info *c);

321 322
#else /* !CONFIG_UBIFS_FS_DEBUG */

323 324
/* Use "if (0)" to make compiler check arguments even if debugging is off */
#define ubifs_assert(expr)  do {                                               \
325
	if (0)                                                                 \
326 327 328 329
		printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
		       __func__, __LINE__, current->pid);                      \
} while (0)

330 331 332
#define dbg_err(fmt, ...)   do {                   \
	if (0)                                     \
		ubifs_err(fmt, ##__VA_ARGS__);     \
333 334
} while (0)

335 336 337
#define DBGKEY(key)  ((char *)(key))
#define DBGKEY1(key) ((char *)(key))

338 339 340
#define ubifs_dbg_msg(fmt, ...) do {               \
	if (0)                                     \
		pr_debug(fmt "\n", ##__VA_ARGS__); \
341 342
} while (0)

343
#define dbg_dump_stack()
344
#define ubifs_assert_cmt_locked(c)
345

346 347 348 349 350 351 352 353 354 355 356 357 358 359
#define dbg_msg(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_gen(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_jnl(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_tnc(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_lp(fmt, ...)    ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_find(fmt, ...)  ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_mnt(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_io(fmt, ...)    ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_cmt(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_budg(fmt, ...)  ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_log(fmt, ...)   ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_gc(fmt, ...)    ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_scan(fmt, ...)  ubifs_dbg_msg(fmt, ##__VA_ARGS__)
#define dbg_rcvry(fmt, ...) ubifs_dbg_msg(fmt, ##__VA_ARGS__)
360

361 362 363 364 365 366 367 368
static inline int ubifs_debugging_init(struct ubifs_info *c)      { return 0; }
static inline void ubifs_debugging_exit(struct ubifs_info *c)     { return; }
static inline const char *dbg_ntype(int type)                     { return ""; }
static inline const char *dbg_cstate(int cmt_state)               { return ""; }
static inline const char *dbg_jhead(int jhead)                    { return ""; }
static inline const char *
dbg_get_key_dump(const struct ubifs_info *c,
		 const union ubifs_key *key)                      { return ""; }
369
static inline void dbg_dump_inode(struct ubifs_info *c,
370 371 372 373 374 375 376 377 378 379
				  const struct inode *inode)      { return; }
static inline void dbg_dump_node(const struct ubifs_info *c,
				 const void *node)                { return; }
static inline void dbg_dump_lpt_node(const struct ubifs_info *c,
				     void *node, int lnum,
				     int offs)                    { return; }
static inline void
dbg_dump_budget_req(const struct ubifs_budget_req *req)           { return; }
static inline void
dbg_dump_lstats(const struct ubifs_lp_stats *lst)                 { return; }
380 381 382
static inline void
dbg_dump_budg(struct ubifs_info *c,
	      const struct ubifs_budg_info *bi)                   { return; }
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
static inline void dbg_dump_lprop(const struct ubifs_info *c,
				  const struct ubifs_lprops *lp)  { return; }
static inline void dbg_dump_lprops(struct ubifs_info *c)          { return; }
static inline void dbg_dump_lpt_info(struct ubifs_info *c)        { return; }
static inline void dbg_dump_leb(const struct ubifs_info *c,
				int lnum)                         { return; }
static inline void
dbg_dump_znode(const struct ubifs_info *c,
	       const struct ubifs_znode *znode)                   { return; }
static inline void dbg_dump_heap(struct ubifs_info *c,
				 struct ubifs_lpt_heap *heap,
				 int cat)                         { return; }
static inline void dbg_dump_pnode(struct ubifs_info *c,
				  struct ubifs_pnode *pnode,
				  struct ubifs_nnode *parent,
				  int iip)                        { return; }
static inline void dbg_dump_tnc(struct ubifs_info *c)             { return; }
static inline void dbg_dump_index(struct ubifs_info *c)           { return; }
static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c)  { return; }

static inline int dbg_walk_index(struct ubifs_info *c,
				 dbg_leaf_callback leaf_cb,
				 dbg_znode_callback znode_cb,
				 void *priv)                      { return 0; }
static inline void dbg_save_space_info(struct ubifs_info *c)      { return; }
static inline int dbg_check_space_info(struct ubifs_info *c)      { return 0; }
static inline int dbg_check_lprops(struct ubifs_info *c)          { return 0; }
static inline int
dbg_old_index_check_init(struct ubifs_info *c,
			 struct ubifs_zbranch *zroot)             { return 0; }
static inline int
dbg_check_old_index(struct ubifs_info *c,
		    struct ubifs_zbranch *zroot)                  { return 0; }
static inline int dbg_check_cats(struct ubifs_info *c)            { return 0; }
static inline int dbg_check_ltab(struct ubifs_info *c)            { return 0; }
static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c)      { return 0; }
static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
				 int action, int len)             { return 0; }
421 422 423
static inline int
dbg_check_synced_i_size(const struct ubifs_info *c,
			struct inode *inode)                      { return 0; }
424
static inline int dbg_check_dir(struct ubifs_info *c,
425
				const struct inode *dir)          { return 0; }
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
static inline int dbg_check_tnc(struct ubifs_info *c, int extra)  { return 0; }
static inline int dbg_check_idx_size(struct ubifs_info *c,
				     long long idx_size)          { return 0; }
static inline int dbg_check_filesystem(struct ubifs_info *c)      { return 0; }
static inline void dbg_check_heap(struct ubifs_info *c,
				  struct ubifs_lpt_heap *heap,
				  int cat, int add_pos)           { return; }
static inline int dbg_check_lpt_nodes(struct ubifs_info *c,
	struct ubifs_cnode *cnode, int row, int col)              { return 0; }
static inline int dbg_check_inode_size(struct ubifs_info *c,
				       const struct inode *inode,
				       loff_t size)               { return 0; }
static inline int
dbg_check_data_nodes_order(struct ubifs_info *c,
			   struct list_head *head)                { return 0; }
static inline int
dbg_check_nondata_nodes_order(struct ubifs_info *c,
			      struct list_head *head)             { return 0; }

445 446 447 448 449 450 451 452 453
static inline int dbg_leb_write(struct ubifs_info *c, int lnum,
				const void *buf, int offset,
				int len, int dtype)               { return 0; }
static inline int dbg_leb_change(struct ubifs_info *c, int lnum,
				 const void *buf, int len,
				 int dtype)                       { return 0; }
static inline int dbg_leb_unmap(struct ubifs_info *c, int lnum)   { return 0; }
static inline int dbg_leb_map(struct ubifs_info *c, int lnum,
			      int dtype)                          { return 0; }
454

455
static inline int dbg_is_chk_gen(const struct ubifs_info *c)      { return 0; }
456
static inline int dbg_is_chk_index(const struct ubifs_info *c)    { return 0; }
457 458 459 460
static inline int dbg_is_chk_orph(const struct ubifs_info *c)     { return 0; }
static inline int dbg_is_chk_lprops(const struct ubifs_info *c)   { return 0; }
static inline int dbg_is_chk_fs(const struct ubifs_info *c)       { return 0; }
static inline int dbg_is_tst_rcvry(const struct ubifs_info *c)    { return 0; }
461
static inline int dbg_is_power_cut(const struct ubifs_info *c)    { return 0; }
462 463 464 465 466

static inline int dbg_debugfs_init(void)                          { return 0; }
static inline void dbg_debugfs_exit(void)                         { return; }
static inline int dbg_debugfs_init_fs(struct ubifs_info *c)       { return 0; }
static inline int dbg_debugfs_exit_fs(struct ubifs_info *c)       { return 0; }
467

A
Artem Bityutskiy 已提交
468
#endif /* !CONFIG_UBIFS_FS_DEBUG */
469
#endif /* !__UBIFS_DEBUG_H__ */