diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 13:11:23 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-16 13:11:23 -0400 |
commit | a6aae4dd0ffad299a33d122f8a339b399bee5381 (patch) | |
tree | 958b015be27d97d079a3c14694576571ca916600 /fs/ubifs/lpt_commit.c | |
parent | f70b7e52aa23c9aea5346b9730b402fb55f9079b (diff) |
UBIFS: get rid of dbg_err
This patch removes the 'dbg_err()' macro and we now use 'ubifs_err()' instead.
The idea of 'dbg_err()' was to compile out some error message to make the
binary a bit smaller - but I think it was a bad idea.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
-rw-r--r-- | fs/ubifs/lpt_commit.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 97822db3afbc..862c4ca98b85 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -320,9 +320,8 @@ static int layout_cnodes(struct ubifs_info *c) | |||
320 | return 0; | 320 | return 0; |
321 | 321 | ||
322 | no_space: | 322 | no_space: |
323 | ubifs_err("LPT out of space"); | 323 | ubifs_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, " |
324 | dbg_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, " | 324 | "done_lsave %d", lnum, offs, len, done_ltab, done_lsave); |
325 | "done_lsave %d", lnum, offs, len, done_ltab, done_lsave); | ||
326 | ubifs_dump_lpt_info(c); | 325 | ubifs_dump_lpt_info(c); |
327 | ubifs_dump_lpt_lebs(c); | 326 | ubifs_dump_lpt_lebs(c); |
328 | dump_stack(); | 327 | dump_stack(); |
@@ -548,9 +547,8 @@ static int write_cnodes(struct ubifs_info *c) | |||
548 | return 0; | 547 | return 0; |
549 | 548 | ||
550 | no_space: | 549 | no_space: |
551 | ubifs_err("LPT out of space mismatch"); | 550 | ubifs_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " |
552 | dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " | 551 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); |
553 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); | ||
554 | ubifs_dump_lpt_info(c); | 552 | ubifs_dump_lpt_info(c); |
555 | ubifs_dump_lpt_lebs(c); | 553 | ubifs_dump_lpt_lebs(c); |
556 | dump_stack(); | 554 | dump_stack(); |
@@ -1733,7 +1731,7 @@ int dbg_check_ltab(struct ubifs_info *c) | |||
1733 | for (lnum = c->lpt_first; lnum <= c->lpt_last; lnum++) { | 1731 | for (lnum = c->lpt_first; lnum <= c->lpt_last; lnum++) { |
1734 | err = dbg_check_ltab_lnum(c, lnum); | 1732 | err = dbg_check_ltab_lnum(c, lnum); |
1735 | if (err) { | 1733 | if (err) { |
1736 | dbg_err("failed at LEB %d", lnum); | 1734 | ubifs_err("failed at LEB %d", lnum); |
1737 | return err; | 1735 | return err; |
1738 | } | 1736 | } |
1739 | } | 1737 | } |
@@ -1765,8 +1763,8 @@ int dbg_chk_lpt_free_spc(struct ubifs_info *c) | |||
1765 | free += c->leb_size; | 1763 | free += c->leb_size; |
1766 | } | 1764 | } |
1767 | if (free < c->lpt_sz) { | 1765 | if (free < c->lpt_sz) { |
1768 | dbg_err("LPT space error: free %lld lpt_sz %lld", | 1766 | ubifs_err("LPT space error: free %lld lpt_sz %lld", |
1769 | free, c->lpt_sz); | 1767 | free, c->lpt_sz); |
1770 | ubifs_dump_lpt_info(c); | 1768 | ubifs_dump_lpt_info(c); |
1771 | ubifs_dump_lpt_lebs(c); | 1769 | ubifs_dump_lpt_lebs(c); |
1772 | dump_stack(); | 1770 | dump_stack(); |
@@ -1805,13 +1803,13 @@ int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len) | |||
1805 | d->chk_lpt_lebs = 0; | 1803 | d->chk_lpt_lebs = 0; |
1806 | d->chk_lpt_wastage = 0; | 1804 | d->chk_lpt_wastage = 0; |
1807 | if (c->dirty_pn_cnt > c->pnode_cnt) { | 1805 | if (c->dirty_pn_cnt > c->pnode_cnt) { |
1808 | dbg_err("dirty pnodes %d exceed max %d", | 1806 | ubifs_err("dirty pnodes %d exceed max %d", |
1809 | c->dirty_pn_cnt, c->pnode_cnt); | 1807 | c->dirty_pn_cnt, c->pnode_cnt); |
1810 | err = -EINVAL; | 1808 | err = -EINVAL; |
1811 | } | 1809 | } |
1812 | if (c->dirty_nn_cnt > c->nnode_cnt) { | 1810 | if (c->dirty_nn_cnt > c->nnode_cnt) { |
1813 | dbg_err("dirty nnodes %d exceed max %d", | 1811 | ubifs_err("dirty nnodes %d exceed max %d", |
1814 | c->dirty_nn_cnt, c->nnode_cnt); | 1812 | c->dirty_nn_cnt, c->nnode_cnt); |
1815 | err = -EINVAL; | 1813 | err = -EINVAL; |
1816 | } | 1814 | } |
1817 | return err; | 1815 | return err; |
@@ -1828,23 +1826,23 @@ int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len) | |||
1828 | chk_lpt_sz *= d->chk_lpt_lebs; | 1826 | chk_lpt_sz *= d->chk_lpt_lebs; |
1829 | chk_lpt_sz += len - c->nhead_offs; | 1827 | chk_lpt_sz += len - c->nhead_offs; |
1830 | if (d->chk_lpt_sz != chk_lpt_sz) { | 1828 | if (d->chk_lpt_sz != chk_lpt_sz) { |
1831 | dbg_err("LPT wrote %lld but space used was %lld", | 1829 | ubifs_err("LPT wrote %lld but space used was %lld", |
1832 | d->chk_lpt_sz, chk_lpt_sz); | 1830 | d->chk_lpt_sz, chk_lpt_sz); |
1833 | err = -EINVAL; | 1831 | err = -EINVAL; |
1834 | } | 1832 | } |
1835 | if (d->chk_lpt_sz > c->lpt_sz) { | 1833 | if (d->chk_lpt_sz > c->lpt_sz) { |
1836 | dbg_err("LPT wrote %lld but lpt_sz is %lld", | 1834 | ubifs_err("LPT wrote %lld but lpt_sz is %lld", |
1837 | d->chk_lpt_sz, c->lpt_sz); | 1835 | d->chk_lpt_sz, c->lpt_sz); |
1838 | err = -EINVAL; | 1836 | err = -EINVAL; |
1839 | } | 1837 | } |
1840 | if (d->chk_lpt_sz2 && d->chk_lpt_sz != d->chk_lpt_sz2) { | 1838 | if (d->chk_lpt_sz2 && d->chk_lpt_sz != d->chk_lpt_sz2) { |
1841 | dbg_err("LPT layout size %lld but wrote %lld", | 1839 | ubifs_err("LPT layout size %lld but wrote %lld", |
1842 | d->chk_lpt_sz, d->chk_lpt_sz2); | 1840 | d->chk_lpt_sz, d->chk_lpt_sz2); |
1843 | err = -EINVAL; | 1841 | err = -EINVAL; |
1844 | } | 1842 | } |
1845 | if (d->chk_lpt_sz2 && d->new_nhead_offs != len) { | 1843 | if (d->chk_lpt_sz2 && d->new_nhead_offs != len) { |
1846 | dbg_err("LPT new nhead offs: expected %d was %d", | 1844 | ubifs_err("LPT new nhead offs: expected %d was %d", |
1847 | d->new_nhead_offs, len); | 1845 | d->new_nhead_offs, len); |
1848 | err = -EINVAL; | 1846 | err = -EINVAL; |
1849 | } | 1847 | } |
1850 | lpt_sz = (long long)c->pnode_cnt * c->pnode_sz; | 1848 | lpt_sz = (long long)c->pnode_cnt * c->pnode_sz; |
@@ -1853,8 +1851,8 @@ int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len) | |||
1853 | if (c->big_lpt) | 1851 | if (c->big_lpt) |
1854 | lpt_sz += c->lsave_sz; | 1852 | lpt_sz += c->lsave_sz; |
1855 | if (d->chk_lpt_sz - d->chk_lpt_wastage > lpt_sz) { | 1853 | if (d->chk_lpt_sz - d->chk_lpt_wastage > lpt_sz) { |
1856 | dbg_err("LPT chk_lpt_sz %lld + waste %lld exceeds %lld", | 1854 | ubifs_err("LPT chk_lpt_sz %lld + waste %lld exceeds %lld", |
1857 | d->chk_lpt_sz, d->chk_lpt_wastage, lpt_sz); | 1855 | d->chk_lpt_sz, d->chk_lpt_wastage, lpt_sz); |
1858 | err = -EINVAL; | 1856 | err = -EINVAL; |
1859 | } | 1857 | } |
1860 | if (err) { | 1858 | if (err) { |