Commit 787845bdeadd368eedeace92d5bf53f5aa1450ba
1 parent
45e12d901f
Exists in
master
and in
7 other branches
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: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
fs/ubifs/lpt_commit.c
... | ... | @@ -320,6 +320,7 @@ |
320 | 320 | dbg_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, " |
321 | 321 | "done_lsave %d", lnum, offs, len, done_ltab, done_lsave); |
322 | 322 | dbg_dump_lpt_info(c); |
323 | + dump_stack(); | |
323 | 324 | return err; |
324 | 325 | } |
325 | 326 | |
... | ... | @@ -548,6 +549,7 @@ |
548 | 549 | dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " |
549 | 550 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); |
550 | 551 | dbg_dump_lpt_info(c); |
552 | + dump_stack(); | |
551 | 553 | return err; |
552 | 554 | } |
553 | 555 | |
... | ... | @@ -1722,6 +1724,7 @@ |
1722 | 1724 | dbg_err("LPT space error: free %lld lpt_sz %lld", |
1723 | 1725 | free, c->lpt_sz); |
1724 | 1726 | dbg_dump_lpt_info(c); |
1727 | + dump_stack(); | |
1725 | 1728 | return -EINVAL; |
1726 | 1729 | } |
1727 | 1730 | return 0; |
1728 | 1731 | |
... | ... | @@ -1803,8 +1806,10 @@ |
1803 | 1806 | d->chk_lpt_sz, d->chk_lpt_wastage, lpt_sz); |
1804 | 1807 | err = -EINVAL; |
1805 | 1808 | } |
1806 | - if (err) | |
1809 | + if (err) { | |
1807 | 1810 | dbg_dump_lpt_info(c); |
1811 | + dump_stack(); | |
1812 | + } | |
1808 | 1813 | d->chk_lpt_sz2 = d->chk_lpt_sz; |
1809 | 1814 | d->chk_lpt_sz = 0; |
1810 | 1815 | d->chk_lpt_wastage = 0; |