static DEFINE_SPINLOCK(dbg_lock);
#endif
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
static const char *get_key_fmt(int fmt)
{
switch (fmt) {
(unsigned long long)le64_to_cpu(ch->sqnum));
pr_err("\tlen %u\n", le32_to_cpu(ch->len));
}
+#endif
void ubifs_dump_inode(struct ubifs_info *c, const struct inode *inode)
{
void ubifs_dump_node(const struct ubifs_info *c, const void *node)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int i, n;
union ubifs_key key;
const struct ubifs_ch *ch = node;
(int)ch->node_type);
}
spin_unlock(&dbg_lock);
+#endif
}
void ubifs_dump_budget_req(const struct ubifs_budget_req *req)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
spin_lock(&dbg_lock);
pr_err("Budgeting request: new_ino %d, dirtied_ino %d\n",
req->new_ino, req->dirtied_ino);
pr_err("\tdata_growth %d dd_growth %d\n",
req->data_growth, req->dd_growth);
spin_unlock(&dbg_lock);
+#endif
}
void ubifs_dump_lstats(const struct ubifs_lp_stats *lst)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
spin_lock(&dbg_lock);
pr_err("(pid %d) Lprops statistics: empty_lebs %d, idx_lebs %d\n",
current->pid, lst->empty_lebs, lst->idx_lebs);
pr_err("\ttotal_used %lld, total_dark %lld, total_dead %lld\n",
lst->total_used, lst->total_dark, lst->total_dead);
spin_unlock(&dbg_lock);
+#endif
}
#ifndef __UBOOT__
void ubifs_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int i, spc, dark = 0, dead = 0;
struct rb_node *rb;
struct ubifs_bud *bud;
if (lp->lnum == c->gc_lnum)
pr_cont(", GC LEB");
pr_cont(")\n");
+#endif
}
void ubifs_dump_lprops(struct ubifs_info *c)
void ubifs_dump_lpt_info(struct ubifs_info *c)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int i;
spin_lock(&dbg_lock);
i + c->lpt_first, c->ltab[i].free, c->ltab[i].dirty,
c->ltab[i].tgc, c->ltab[i].cmt);
spin_unlock(&dbg_lock);
+#endif
}
void ubifs_dump_sleb(const struct ubifs_info *c,
const struct ubifs_scan_leb *sleb, int offs)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
struct ubifs_scan_node *snod;
pr_err("(pid %d) start dumping scanned data from LEB %d:%d\n",
sleb->lnum, snod->offs, snod->len);
ubifs_dump_node(c, snod->node);
}
+#endif
}
void ubifs_dump_leb(const struct ubifs_info *c, int lnum)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
struct ubifs_scan_leb *sleb;
struct ubifs_scan_node *snod;
void *buf;
out:
vfree(buf);
return;
+#endif
}
void ubifs_dump_znode(const struct ubifs_info *c,
const struct ubifs_znode *znode)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int n;
const struct ubifs_zbranch *zbr;
char key_buf[DBG_KEY_BUF_LEN];
DBG_KEY_BUF_LEN));
}
spin_unlock(&dbg_lock);
+#endif
}
void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int i;
pr_err("(pid %d) start dumping heap cat %d (%d elements)\n",
lprops->dirty, lprops->flags);
}
pr_err("(pid %d) finish dumping heap\n", current->pid);
+#endif
}
void ubifs_dump_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
struct ubifs_nnode *parent, int iip)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
int i;
pr_err("(pid %d) dumping pnode:\n", current->pid);
pr_err("\t%d: free %d dirty %d flags %d lnum %d\n",
i, lp->free, lp->dirty, lp->flags, lp->lnum);
}
+#endif
}
void ubifs_dump_tnc(struct ubifs_info *c)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
struct ubifs_znode *znode;
int level;
znode = ubifs_tnc_levelorder_next(c->zroot.znode, znode);
}
pr_err("(pid %d) finish dumping TNC tree\n", current->pid);
+#endif
}
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
static int dump_znode(struct ubifs_info *c, struct ubifs_znode *znode,
void *priv)
{
ubifs_dump_znode(c, znode);
return 0;
}
+#endif
/**
* ubifs_dump_index - dump the on-flash index.
*/
void ubifs_dump_index(struct ubifs_info *c)
{
+#ifndef CONFIG_UBIFS_SILENCE_DEBUG_DUMP
dbg_walk_index(c, NULL, dump_znode, NULL);
+#endif
}
#ifndef __UBOOT__