Commit 787845bd authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBIFS: dump stack in LPT check functions

It is useful to know how we got to the checking function when
hunting the bugs.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 45e12d90
...@@ -320,6 +320,7 @@ no_space: ...@@ -320,6 +320,7 @@ no_space:
dbg_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, " dbg_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, "
"done_lsave %d", lnum, offs, len, done_ltab, done_lsave); "done_lsave %d", lnum, offs, len, done_ltab, done_lsave);
dbg_dump_lpt_info(c); dbg_dump_lpt_info(c);
dump_stack();
return err; return err;
} }
...@@ -548,6 +549,7 @@ no_space: ...@@ -548,6 +549,7 @@ no_space:
dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab "
"%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave);
dbg_dump_lpt_info(c); dbg_dump_lpt_info(c);
dump_stack();
return err; return err;
} }
...@@ -1722,6 +1724,7 @@ int dbg_chk_lpt_free_spc(struct ubifs_info *c) ...@@ -1722,6 +1724,7 @@ int dbg_chk_lpt_free_spc(struct ubifs_info *c)
dbg_err("LPT space error: free %lld lpt_sz %lld", dbg_err("LPT space error: free %lld lpt_sz %lld",
free, c->lpt_sz); free, c->lpt_sz);
dbg_dump_lpt_info(c); dbg_dump_lpt_info(c);
dump_stack();
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -1803,8 +1806,10 @@ int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len) ...@@ -1803,8 +1806,10 @@ int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len)
d->chk_lpt_sz, d->chk_lpt_wastage, lpt_sz); d->chk_lpt_sz, d->chk_lpt_wastage, lpt_sz);
err = -EINVAL; err = -EINVAL;
} }
if (err) if (err) {
dbg_dump_lpt_info(c); dbg_dump_lpt_info(c);
dump_stack();
}
d->chk_lpt_sz2 = d->chk_lpt_sz; d->chk_lpt_sz2 = d->chk_lpt_sz;
d->chk_lpt_sz = 0; d->chk_lpt_sz = 0;
d->chk_lpt_wastage = 0; d->chk_lpt_wastage = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment