Patchwork [05/20] UBIFS: improve debugging messages

login
register
mail settings
Submitter Artem Bityutskiy
Date May 16, 2011, 7:44 a.m.
Message ID <1305531879-19311-6-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/95681/
State Accepted
Commit c839e29768059c56ef233586e66a2a66edbe93a3
Headers show

Comments

Artem Bityutskiy - May 16, 2011, 7:44 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Print a bit more information is some recovery and replay paths.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/recovery.c |    7 +++----
 fs/ubifs/replay.c   |    3 ++-
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 3f41a0c..42b4512 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -1140,12 +1140,11 @@  int ubifs_rcvry_gc_commit(struct ubifs_info *c)
 	struct ubifs_lprops lp;
 	int err;
 
+	dbg_rcvry("GC head LEB %d, offs %d", wbuf->lnum, wbuf->offs);
+
 	c->gc_lnum = -1;
-	if (wbuf->lnum == -1 || wbuf->offs == c->leb_size) {
-		dbg_rcvry("no GC head: wbuf->lnum %d, wbuf->offs %d",
-			  wbuf->lnum, wbuf->offs);
+	if (wbuf->lnum == -1 || wbuf->offs == c->leb_size)
 		return grab_empty_leb(c);
-	}
 
 	err = ubifs_find_dirty_leb(c, &lp, wbuf->offs, 2);
 	if (err) {
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index c29c468..0052663 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -509,7 +509,7 @@  static int replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
 	struct ubifs_scan_node *snod;
 	struct ubifs_bud *bud;
 
-	dbg_mnt("replay bud LEB %d, head %d", lnum, jhead);
+	dbg_mnt("replay bud LEB %d, head %d, offs %d", lnum, jhead, offs);
 	if (c->need_recovery)
 		sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, jhead != GCHD);
 	else
@@ -636,6 +636,7 @@  static int replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead,
 
 	*dirty = sleb->endpt - offs - used;
 	*free = c->leb_size - sleb->endpt;
+	dbg_mnt("bud LEB %d replied: dirty %d, free %d", lnum, *dirty, *free);
 
 out:
 	ubifs_scan_destroy(sleb);