Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3668b70f authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

UBIFS: print less



UBIFS currently prints a lot of information when it mounts a volume, which
bothers some people. Make it less chatty - print only important information
by default.

Get rid of 'dbg_msg()' macro completely.

Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 6b38d03f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ int ubifs_bg_thread(void *info)
	int err;
	struct ubifs_info *c = info;

	dbg_msg("background thread \"%s\" started, PID %d",
	ubifs_msg("background thread \"%s\" started, PID %d",
		  c->bgt_name, current->pid);
	set_freezable();

@@ -328,7 +328,7 @@ int ubifs_bg_thread(void *info)
		cond_resched();
	}

	dbg_msg("background thread \"%s\" stops", c->bgt_name);
	ubifs_msg("background thread \"%s\" stops", c->bgt_name);
	return 0;
}

+0 −5
Original line number Diff line number Diff line
@@ -176,11 +176,6 @@ struct ubifs_global_debug_info {
		 dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN));    \
} while (0)

/* Just a debugging messages not related to any specific UBIFS subsystem */
#define dbg_msg(fmt, ...)                                                      \
	pr_err("UBIFS DBG (pid %d): %s: " fmt "\n", current->pid,              \
	       __func__, ##__VA_ARGS__)

/* General messages */
#define dbg_gen(fmt, ...)   ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__)
/* Additional journal messages */
+4 −4
Original line number Diff line number Diff line
@@ -982,7 +982,7 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
			goto out;
		}
		if (lprops != lp) {
			dbg_msg("lprops %zx lp %zx lprops->lnum %d lp->lnum %d",
			ubifs_err("lprops %zx lp %zx lprops->lnum %d lp->lnum %d",
				  (size_t)lprops, (size_t)lp, lprops->lnum,
				  lp->lnum);
			err = 4;
@@ -1002,7 +1002,7 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
	}
out:
	if (err) {
		dbg_msg("failed cat %d hpos %d err %d", cat, i, err);
		ubifs_err("failed cat %d hpos %d err %d", cat, i, err);
		dump_stack();
		ubifs_dump_heap(c, heap, cat);
	}
+1 −1
Original line number Diff line number Diff line
@@ -1311,7 +1311,7 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip)
	ubifs_err("error %d reading pnode at %d:%d", err, lnum, offs);
	ubifs_dump_pnode(c, pnode, parent, iip);
	dump_stack();
	dbg_msg("calc num: %d", calc_pnode_num_from_parent(c, parent, iip));
	ubifs_err("calc num: %d", calc_pnode_num_from_parent(c, parent, iip));
	kfree(pnode);
	return err;
}
+6 −6
Original line number Diff line number Diff line
@@ -1662,18 +1662,18 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum)
				continue;
			}
			if (!dbg_is_all_ff(p, len)) {
				dbg_msg("invalid empty space in LEB %d at %d",
				ubifs_err("invalid empty space in LEB %d at %d",
					  lnum, c->leb_size - len);
				err = -EINVAL;
			}
			i = lnum - c->lpt_first;
			if (len != c->ltab[i].free) {
				dbg_msg("invalid free space in LEB %d (free %d, expected %d)",
				ubifs_err("invalid free space in LEB %d (free %d, expected %d)",
					  lnum, len, c->ltab[i].free);
				err = -EINVAL;
			}
			if (dirty != c->ltab[i].dirty) {
				dbg_msg("invalid dirty space in LEB %d (dirty %d, expected %d)",
				ubifs_err("invalid dirty space in LEB %d (dirty %d, expected %d)",
					  lnum, dirty, c->ltab[i].dirty);
				err = -EINVAL;
			}
Loading