diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-27 06:34:09 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-31 10:32:57 -0400 |
commit | 79fda5179a5227c930e5b0242b5d5ebf3df29422 (patch) | |
tree | cadf0c22f5dca7ce03c213ab6a2bfcaff7b43129 /fs/ubifs | |
parent | 43457c60c8314835412848a9df25d4ba2f49f0ed (diff) |
UBIFS: comply with coding style
Join all the split printk lines in order to stop checkpatch complaining.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/budget.c | 5 | ||||
-rw-r--r-- | fs/ubifs/compress.c | 7 | ||||
-rw-r--r-- | fs/ubifs/debug.c | 157 | ||||
-rw-r--r-- | fs/ubifs/dir.c | 4 | ||||
-rw-r--r-- | fs/ubifs/file.c | 4 | ||||
-rw-r--r-- | fs/ubifs/gc.c | 6 | ||||
-rw-r--r-- | fs/ubifs/log.c | 14 | ||||
-rw-r--r-- | fs/ubifs/lprops.c | 58 | ||||
-rw-r--r-- | fs/ubifs/lpt.c | 3 | ||||
-rw-r--r-- | fs/ubifs/lpt_commit.c | 14 | ||||
-rw-r--r-- | fs/ubifs/orphan.c | 7 | ||||
-rw-r--r-- | fs/ubifs/recovery.c | 11 | ||||
-rw-r--r-- | fs/ubifs/replay.c | 16 | ||||
-rw-r--r-- | fs/ubifs/sb.c | 19 | ||||
-rw-r--r-- | fs/ubifs/scan.c | 7 | ||||
-rw-r--r-- | fs/ubifs/super.c | 35 |
16 files changed, 161 insertions, 206 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index bc4f94b28706..ea9c814c0a33 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c | |||
@@ -342,9 +342,8 @@ static int do_budget_space(struct ubifs_info *c) | |||
342 | lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - | 342 | lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - |
343 | c->lst.taken_empty_lebs; | 343 | c->lst.taken_empty_lebs; |
344 | if (unlikely(rsvd_idx_lebs > lebs)) { | 344 | if (unlikely(rsvd_idx_lebs > lebs)) { |
345 | dbg_budg("out of indexing space: min_idx_lebs %d (old %d), " | 345 | dbg_budg("out of indexing space: min_idx_lebs %d (old %d), rsvd_idx_lebs %d", |
346 | "rsvd_idx_lebs %d", min_idx_lebs, c->bi.min_idx_lebs, | 346 | min_idx_lebs, c->bi.min_idx_lebs, rsvd_idx_lebs); |
347 | rsvd_idx_lebs); | ||
348 | return -ENOSPC; | 347 | return -ENOSPC; |
349 | } | 348 | } |
350 | 349 | ||
diff --git a/fs/ubifs/compress.c b/fs/ubifs/compress.c index 11e4132f314a..2bfa0953335d 100644 --- a/fs/ubifs/compress.c +++ b/fs/ubifs/compress.c | |||
@@ -112,8 +112,7 @@ void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len, | |||
112 | if (compr->comp_mutex) | 112 | if (compr->comp_mutex) |
113 | mutex_unlock(compr->comp_mutex); | 113 | mutex_unlock(compr->comp_mutex); |
114 | if (unlikely(err)) { | 114 | if (unlikely(err)) { |
115 | ubifs_warn("cannot compress %d bytes, compressor %s, " | 115 | ubifs_warn("cannot compress %d bytes, compressor %s, error %d, leave data uncompressed", |
116 | "error %d, leave data uncompressed", | ||
117 | in_len, compr->name, err); | 116 | in_len, compr->name, err); |
118 | goto no_compr; | 117 | goto no_compr; |
119 | } | 118 | } |
@@ -176,8 +175,8 @@ int ubifs_decompress(const void *in_buf, int in_len, void *out_buf, | |||
176 | if (compr->decomp_mutex) | 175 | if (compr->decomp_mutex) |
177 | mutex_unlock(compr->decomp_mutex); | 176 | mutex_unlock(compr->decomp_mutex); |
178 | if (err) | 177 | if (err) |
179 | ubifs_err("cannot decompress %d bytes, compressor %s, " | 178 | ubifs_err("cannot decompress %d bytes, compressor %s, error %d", |
180 | "error %d", in_len, compr->name, err); | 179 | in_len, compr->name, err); |
181 | 180 | ||
182 | return err; | 181 | return err; |
183 | } | 182 | } |
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 5dc993fdca87..9f28375fc5b3 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -509,8 +509,7 @@ void ubifs_dump_node(const struct ubifs_info *c, const void *node) | |||
509 | printk(KERN_ERR "\tname "); | 509 | printk(KERN_ERR "\tname "); |
510 | 510 | ||
511 | if (nlen > UBIFS_MAX_NLEN) | 511 | if (nlen > UBIFS_MAX_NLEN) |
512 | printk(KERN_ERR "(bad name length, not printing, " | 512 | printk(KERN_ERR "(bad name length, not printing, bad or corrupted node)"); |
513 | "bad or corrupted node)"); | ||
514 | else { | 513 | else { |
515 | for (i = 0; i < nlen && dent->name[i]; i++) | 514 | for (i = 0; i < nlen && dent->name[i]; i++) |
516 | printk(KERN_CONT "%c", dent->name[i]); | 515 | printk(KERN_CONT "%c", dent->name[i]); |
@@ -618,14 +617,12 @@ void ubifs_dump_budget_req(const struct ubifs_budget_req *req) | |||
618 | void ubifs_dump_lstats(const struct ubifs_lp_stats *lst) | 617 | void ubifs_dump_lstats(const struct ubifs_lp_stats *lst) |
619 | { | 618 | { |
620 | spin_lock(&dbg_lock); | 619 | spin_lock(&dbg_lock); |
621 | printk(KERN_ERR "(pid %d) Lprops statistics: empty_lebs %d, " | 620 | printk(KERN_ERR "(pid %d) Lprops statistics: empty_lebs %d, idx_lebs %d\n", |
622 | "idx_lebs %d\n", current->pid, lst->empty_lebs, lst->idx_lebs); | 621 | current->pid, lst->empty_lebs, lst->idx_lebs); |
623 | printk(KERN_ERR "\ttaken_empty_lebs %d, total_free %lld, " | 622 | printk(KERN_ERR "\ttaken_empty_lebs %d, total_free %lld, total_dirty %lld\n", |
624 | "total_dirty %lld\n", lst->taken_empty_lebs, lst->total_free, | 623 | lst->taken_empty_lebs, lst->total_free, lst->total_dirty); |
625 | lst->total_dirty); | 624 | printk(KERN_ERR "\ttotal_used %lld, total_dark %lld, total_dead %lld\n", |
626 | printk(KERN_ERR "\ttotal_used %lld, total_dark %lld, " | 625 | lst->total_used, lst->total_dark, lst->total_dead); |
627 | "total_dead %lld\n", lst->total_used, lst->total_dark, | ||
628 | lst->total_dead); | ||
629 | spin_unlock(&dbg_lock); | 626 | spin_unlock(&dbg_lock); |
630 | } | 627 | } |
631 | 628 | ||
@@ -639,16 +636,13 @@ void ubifs_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi) | |||
639 | 636 | ||
640 | spin_lock(&c->space_lock); | 637 | spin_lock(&c->space_lock); |
641 | spin_lock(&dbg_lock); | 638 | spin_lock(&dbg_lock); |
642 | printk(KERN_ERR "(pid %d) Budgeting info: data budget sum %lld, " | 639 | printk(KERN_ERR "(pid %d) Budgeting info: data budget sum %lld, total budget sum %lld\n", |
643 | "total budget sum %lld\n", current->pid, | 640 | current->pid, bi->data_growth + bi->dd_growth, |
644 | bi->data_growth + bi->dd_growth, | ||
645 | bi->data_growth + bi->dd_growth + bi->idx_growth); | 641 | bi->data_growth + bi->dd_growth + bi->idx_growth); |
646 | printk(KERN_ERR "\tbudg_data_growth %lld, budg_dd_growth %lld, " | 642 | printk(KERN_ERR "\tbudg_data_growth %lld, budg_dd_growth %lld, budg_idx_growth %lld\n", |
647 | "budg_idx_growth %lld\n", bi->data_growth, bi->dd_growth, | 643 | bi->data_growth, bi->dd_growth, bi->idx_growth); |
648 | bi->idx_growth); | 644 | printk(KERN_ERR "\tmin_idx_lebs %d, old_idx_sz %llu, uncommitted_idx %lld\n", |
649 | printk(KERN_ERR "\tmin_idx_lebs %d, old_idx_sz %llu, " | 645 | bi->min_idx_lebs, bi->old_idx_sz, bi->uncommitted_idx); |
650 | "uncommitted_idx %lld\n", bi->min_idx_lebs, bi->old_idx_sz, | ||
651 | bi->uncommitted_idx); | ||
652 | printk(KERN_ERR "\tpage_budget %d, inode_budget %d, dent_budget %d\n", | 646 | printk(KERN_ERR "\tpage_budget %d, inode_budget %d, dent_budget %d\n", |
653 | bi->page_budget, bi->inode_budget, bi->dent_budget); | 647 | bi->page_budget, bi->inode_budget, bi->dent_budget); |
654 | printk(KERN_ERR "\tnospace %u, nospace_rp %u\n", | 648 | printk(KERN_ERR "\tnospace %u, nospace_rp %u\n", |
@@ -666,8 +660,8 @@ void ubifs_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi) | |||
666 | 660 | ||
667 | printk(KERN_ERR "\tfreeable_cnt %d, calc_idx_sz %lld, idx_gc_cnt %d\n", | 661 | printk(KERN_ERR "\tfreeable_cnt %d, calc_idx_sz %lld, idx_gc_cnt %d\n", |
668 | c->freeable_cnt, c->calc_idx_sz, c->idx_gc_cnt); | 662 | c->freeable_cnt, c->calc_idx_sz, c->idx_gc_cnt); |
669 | printk(KERN_ERR "\tdirty_pg_cnt %ld, dirty_zn_cnt %ld, " | 663 | printk(KERN_ERR "\tdirty_pg_cnt %ld, dirty_zn_cnt %ld, clean_zn_cnt %ld\n", |
670 | "clean_zn_cnt %ld\n", atomic_long_read(&c->dirty_pg_cnt), | 664 | atomic_long_read(&c->dirty_pg_cnt), |
671 | atomic_long_read(&c->dirty_zn_cnt), | 665 | atomic_long_read(&c->dirty_zn_cnt), |
672 | atomic_long_read(&c->clean_zn_cnt)); | 666 | atomic_long_read(&c->clean_zn_cnt)); |
673 | printk(KERN_ERR "\tgc_lnum %d, ihead_lnum %d\n", | 667 | printk(KERN_ERR "\tgc_lnum %d, ihead_lnum %d\n", |
@@ -715,15 +709,13 @@ void ubifs_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp) | |||
715 | dark = ubifs_calc_dark(c, spc); | 709 | dark = ubifs_calc_dark(c, spc); |
716 | 710 | ||
717 | if (lp->flags & LPROPS_INDEX) | 711 | if (lp->flags & LPROPS_INDEX) |
718 | printk(KERN_ERR "LEB %-7d free %-8d dirty %-8d used %-8d " | 712 | printk(KERN_ERR "LEB %-7d free %-8d dirty %-8d used %-8d free + dirty %-8d flags %#x (", |
719 | "free + dirty %-8d flags %#x (", lp->lnum, lp->free, | 713 | lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, |
720 | lp->dirty, c->leb_size - spc, spc, lp->flags); | 714 | lp->flags); |
721 | else | 715 | else |
722 | printk(KERN_ERR "LEB %-7d free %-8d dirty %-8d used %-8d " | 716 | printk(KERN_ERR "LEB %-7d free %-8d dirty %-8d used %-8d free + dirty %-8d dark %-4d dead %-4d nodes fit %-3d flags %#-4x (", |
723 | "free + dirty %-8d dark %-4d dead %-4d nodes fit %-3d " | 717 | lp->lnum, lp->free, lp->dirty, c->leb_size - spc, spc, |
724 | "flags %#-4x (", lp->lnum, lp->free, lp->dirty, | 718 | dark, dead, (int)(spc / UBIFS_MAX_NODE_SZ), lp->flags); |
725 | c->leb_size - spc, spc, dark, dead, | ||
726 | (int)(spc / UBIFS_MAX_NODE_SZ), lp->flags); | ||
727 | 719 | ||
728 | if (lp->flags & LPROPS_TAKEN) { | 720 | if (lp->flags & LPROPS_TAKEN) { |
729 | if (lp->flags & LPROPS_INDEX) | 721 | if (lp->flags & LPROPS_INDEX) |
@@ -851,9 +843,9 @@ void ubifs_dump_lpt_info(struct ubifs_info *c) | |||
851 | printk(KERN_ERR "\tLPT lsave is at %d:%d\n", | 843 | printk(KERN_ERR "\tLPT lsave is at %d:%d\n", |
852 | c->lsave_lnum, c->lsave_offs); | 844 | c->lsave_lnum, c->lsave_offs); |
853 | for (i = 0; i < c->lpt_lebs; i++) | 845 | for (i = 0; i < c->lpt_lebs; i++) |
854 | printk(KERN_ERR "\tLPT LEB %d free %d dirty %d tgc %d " | 846 | printk(KERN_ERR "\tLPT LEB %d free %d dirty %d tgc %d cmt %d\n", |
855 | "cmt %d\n", i + c->lpt_first, c->ltab[i].free, | 847 | i + c->lpt_first, c->ltab[i].free, c->ltab[i].dirty, |
856 | c->ltab[i].dirty, c->ltab[i].tgc, c->ltab[i].cmt); | 848 | c->ltab[i].tgc, c->ltab[i].cmt); |
857 | spin_unlock(&dbg_lock); | 849 | spin_unlock(&dbg_lock); |
858 | } | 850 | } |
859 | 851 | ||
@@ -867,8 +859,8 @@ void ubifs_dump_sleb(const struct ubifs_info *c, | |||
867 | 859 | ||
868 | list_for_each_entry(snod, &sleb->nodes, list) { | 860 | list_for_each_entry(snod, &sleb->nodes, list) { |
869 | cond_resched(); | 861 | cond_resched(); |
870 | printk(KERN_ERR "Dumping node at LEB %d:%d len %d\n", sleb->lnum, | 862 | printk(KERN_ERR "Dumping node at LEB %d:%d len %d\n", |
871 | snod->offs, snod->len); | 863 | sleb->lnum, snod->offs, snod->len); |
872 | ubifs_dump_node(c, snod->node); | 864 | ubifs_dump_node(c, snod->node); |
873 | } | 865 | } |
874 | } | 866 | } |
@@ -926,10 +918,9 @@ void ubifs_dump_znode(const struct ubifs_info *c, | |||
926 | else | 918 | else |
927 | zbr = &c->zroot; | 919 | zbr = &c->zroot; |
928 | 920 | ||
929 | printk(KERN_ERR "znode %p, LEB %d:%d len %d parent %p iip %d level %d" | 921 | printk(KERN_ERR "znode %p, LEB %d:%d len %d parent %p iip %d level %d child_cnt %d flags %lx\n", |
930 | " child_cnt %d flags %lx\n", znode, zbr->lnum, zbr->offs, | 922 | znode, zbr->lnum, zbr->offs, zbr->len, znode->parent, znode->iip, |
931 | zbr->len, znode->parent, znode->iip, znode->level, | 923 | znode->level, znode->child_cnt, znode->flags); |
932 | znode->child_cnt, znode->flags); | ||
933 | 924 | ||
934 | if (znode->child_cnt <= 0 || znode->child_cnt > c->fanout) { | 925 | if (znode->child_cnt <= 0 || znode->child_cnt > c->fanout) { |
935 | spin_unlock(&dbg_lock); | 926 | spin_unlock(&dbg_lock); |
@@ -940,19 +931,15 @@ void ubifs_dump_znode(const struct ubifs_info *c, | |||
940 | for (n = 0; n < znode->child_cnt; n++) { | 931 | for (n = 0; n < znode->child_cnt; n++) { |
941 | zbr = &znode->zbranch[n]; | 932 | zbr = &znode->zbranch[n]; |
942 | if (znode->level > 0) | 933 | if (znode->level > 0) |
943 | printk(KERN_ERR "\t%d: znode %p LEB %d:%d len %d key " | 934 | printk(KERN_ERR "\t%d: znode %p LEB %d:%d len %d key %s\n", |
944 | "%s\n", n, zbr->znode, zbr->lnum, | 935 | n, zbr->znode, zbr->lnum, zbr->offs, zbr->len, |
945 | zbr->offs, zbr->len, | 936 | dbg_snprintf_key(c, &zbr->key, key_buf, |
946 | dbg_snprintf_key(c, &zbr->key, | 937 | DBG_KEY_BUF_LEN)); |
947 | key_buf, | ||
948 | DBG_KEY_BUF_LEN)); | ||
949 | else | 938 | else |
950 | printk(KERN_ERR "\t%d: LNC %p LEB %d:%d len %d key " | 939 | printk(KERN_ERR "\t%d: LNC %p LEB %d:%d len %d key %s\n", |
951 | "%s\n", n, zbr->znode, zbr->lnum, | 940 | n, zbr->znode, zbr->lnum, zbr->offs, zbr->len, |
952 | zbr->offs, zbr->len, | 941 | dbg_snprintf_key(c, &zbr->key, key_buf, |
953 | dbg_snprintf_key(c, &zbr->key, | 942 | DBG_KEY_BUF_LEN)); |
954 | key_buf, | ||
955 | DBG_KEY_BUF_LEN)); | ||
956 | } | 943 | } |
957 | spin_unlock(&dbg_lock); | 944 | spin_unlock(&dbg_lock); |
958 | } | 945 | } |
@@ -966,9 +953,9 @@ void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat) | |||
966 | for (i = 0; i < heap->cnt; i++) { | 953 | for (i = 0; i < heap->cnt; i++) { |
967 | struct ubifs_lprops *lprops = heap->arr[i]; | 954 | struct ubifs_lprops *lprops = heap->arr[i]; |
968 | 955 | ||
969 | printk(KERN_ERR "\t%d. LEB %d hpos %d free %d dirty %d " | 956 | printk(KERN_ERR "\t%d. LEB %d hpos %d free %d dirty %d flags %d\n", |
970 | "flags %d\n", i, lprops->lnum, lprops->hpos, | 957 | i, lprops->lnum, lprops->hpos, lprops->free, |
971 | lprops->free, lprops->dirty, lprops->flags); | 958 | lprops->dirty, lprops->flags); |
972 | } | 959 | } |
973 | printk(KERN_ERR "(pid %d) finish dumping heap\n", current->pid); | 960 | printk(KERN_ERR "(pid %d) finish dumping heap\n", current->pid); |
974 | } | 961 | } |
@@ -1148,8 +1135,8 @@ int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode) | |||
1148 | mutex_lock(&ui->ui_mutex); | 1135 | mutex_lock(&ui->ui_mutex); |
1149 | spin_lock(&ui->ui_lock); | 1136 | spin_lock(&ui->ui_lock); |
1150 | if (ui->ui_size != ui->synced_i_size && !ui->dirty) { | 1137 | if (ui->ui_size != ui->synced_i_size && !ui->dirty) { |
1151 | ubifs_err("ui_size is %lld, synced_i_size is %lld, but inode " | 1138 | ubifs_err("ui_size is %lld, synced_i_size is %lld, but inode is clean", |
1152 | "is clean", ui->ui_size, ui->synced_i_size); | 1139 | ui->ui_size, ui->synced_i_size); |
1153 | ubifs_err("i_ino %lu, i_mode %#x, i_size %lld", inode->i_ino, | 1140 | ubifs_err("i_ino %lu, i_mode %#x, i_size %lld", inode->i_ino, |
1154 | inode->i_mode, i_size_read(inode)); | 1141 | inode->i_mode, i_size_read(inode)); |
1155 | dump_stack(); | 1142 | dump_stack(); |
@@ -1211,17 +1198,16 @@ int dbg_check_dir(struct ubifs_info *c, const struct inode *dir) | |||
1211 | kfree(pdent); | 1198 | kfree(pdent); |
1212 | 1199 | ||
1213 | if (i_size_read(dir) != size) { | 1200 | if (i_size_read(dir) != size) { |
1214 | ubifs_err("directory inode %lu has size %llu, " | 1201 | ubifs_err("directory inode %lu has size %llu, but calculated size is %llu", |
1215 | "but calculated size is %llu", dir->i_ino, | 1202 | dir->i_ino, (unsigned long long)i_size_read(dir), |
1216 | (unsigned long long)i_size_read(dir), | ||
1217 | (unsigned long long)size); | 1203 | (unsigned long long)size); |
1218 | ubifs_dump_inode(c, dir); | 1204 | ubifs_dump_inode(c, dir); |
1219 | dump_stack(); | 1205 | dump_stack(); |
1220 | return -EINVAL; | 1206 | return -EINVAL; |
1221 | } | 1207 | } |
1222 | if (dir->i_nlink != nlink) { | 1208 | if (dir->i_nlink != nlink) { |
1223 | ubifs_err("directory inode %lu has nlink %u, but calculated " | 1209 | ubifs_err("directory inode %lu has nlink %u, but calculated nlink is %u", |
1224 | "nlink is %u", dir->i_ino, dir->i_nlink, nlink); | 1210 | dir->i_ino, dir->i_nlink, nlink); |
1225 | ubifs_dump_inode(c, dir); | 1211 | ubifs_dump_inode(c, dir); |
1226 | dump_stack(); | 1212 | dump_stack(); |
1227 | return -EINVAL; | 1213 | return -EINVAL; |
@@ -1680,8 +1666,8 @@ int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, | |||
1680 | if (znode_cb) { | 1666 | if (znode_cb) { |
1681 | err = znode_cb(c, znode, priv); | 1667 | err = znode_cb(c, znode, priv); |
1682 | if (err) { | 1668 | if (err) { |
1683 | ubifs_err("znode checking function returned " | 1669 | ubifs_err("znode checking function returned error %d", |
1684 | "error %d", err); | 1670 | err); |
1685 | ubifs_dump_znode(c, znode); | 1671 | ubifs_dump_znode(c, znode); |
1686 | goto out_dump; | 1672 | goto out_dump; |
1687 | } | 1673 | } |
@@ -1691,9 +1677,7 @@ int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, | |||
1691 | zbr = &znode->zbranch[idx]; | 1677 | zbr = &znode->zbranch[idx]; |
1692 | err = leaf_cb(c, zbr, priv); | 1678 | err = leaf_cb(c, zbr, priv); |
1693 | if (err) { | 1679 | if (err) { |
1694 | ubifs_err("leaf checking function " | 1680 | ubifs_err("leaf checking function returned error %d, for leaf at LEB %d:%d", |
1695 | "returned error %d, for leaf " | ||
1696 | "at LEB %d:%d", | ||
1697 | err, zbr->lnum, zbr->offs); | 1681 | err, zbr->lnum, zbr->offs); |
1698 | goto out_dump; | 1682 | goto out_dump; |
1699 | } | 1683 | } |
@@ -1801,8 +1785,8 @@ int dbg_check_idx_size(struct ubifs_info *c, long long idx_size) | |||
1801 | } | 1785 | } |
1802 | 1786 | ||
1803 | if (calc != idx_size) { | 1787 | if (calc != idx_size) { |
1804 | ubifs_err("index size check failed: calculated size is %lld, " | 1788 | ubifs_err("index size check failed: calculated size is %lld, should be %lld", |
1805 | "should be %lld", calc, idx_size); | 1789 | calc, idx_size); |
1806 | dump_stack(); | 1790 | dump_stack(); |
1807 | return -EINVAL; | 1791 | return -EINVAL; |
1808 | } | 1792 | } |
@@ -2114,8 +2098,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr, | |||
2114 | fscki = read_add_inode(c, priv, inum); | 2098 | fscki = read_add_inode(c, priv, inum); |
2115 | if (IS_ERR(fscki)) { | 2099 | if (IS_ERR(fscki)) { |
2116 | err = PTR_ERR(fscki); | 2100 | err = PTR_ERR(fscki); |
2117 | ubifs_err("error %d while processing data node and " | 2101 | ubifs_err("error %d while processing data node and trying to find inode node %lu", |
2118 | "trying to find inode node %lu", | ||
2119 | err, (unsigned long)inum); | 2102 | err, (unsigned long)inum); |
2120 | goto out_dump; | 2103 | goto out_dump; |
2121 | } | 2104 | } |
@@ -2125,9 +2108,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr, | |||
2125 | blk_offs <<= UBIFS_BLOCK_SHIFT; | 2108 | blk_offs <<= UBIFS_BLOCK_SHIFT; |
2126 | blk_offs += le32_to_cpu(dn->size); | 2109 | blk_offs += le32_to_cpu(dn->size); |
2127 | if (blk_offs > fscki->size) { | 2110 | if (blk_offs > fscki->size) { |
2128 | ubifs_err("data node at LEB %d:%d is not within inode " | 2111 | ubifs_err("data node at LEB %d:%d is not within inode size %lld", |
2129 | "size %lld", zbr->lnum, zbr->offs, | 2112 | zbr->lnum, zbr->offs, fscki->size); |
2130 | fscki->size); | ||
2131 | err = -EINVAL; | 2113 | err = -EINVAL; |
2132 | goto out_dump; | 2114 | goto out_dump; |
2133 | } | 2115 | } |
@@ -2148,8 +2130,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr, | |||
2148 | fscki = read_add_inode(c, priv, inum); | 2130 | fscki = read_add_inode(c, priv, inum); |
2149 | if (IS_ERR(fscki)) { | 2131 | if (IS_ERR(fscki)) { |
2150 | err = PTR_ERR(fscki); | 2132 | err = PTR_ERR(fscki); |
2151 | ubifs_err("error %d while processing entry node and " | 2133 | ubifs_err("error %d while processing entry node and trying to find inode node %lu", |
2152 | "trying to find inode node %lu", | ||
2153 | err, (unsigned long)inum); | 2134 | err, (unsigned long)inum); |
2154 | goto out_dump; | 2135 | goto out_dump; |
2155 | } | 2136 | } |
@@ -2161,8 +2142,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr, | |||
2161 | fscki1 = read_add_inode(c, priv, inum); | 2142 | fscki1 = read_add_inode(c, priv, inum); |
2162 | if (IS_ERR(fscki1)) { | 2143 | if (IS_ERR(fscki1)) { |
2163 | err = PTR_ERR(fscki1); | 2144 | err = PTR_ERR(fscki1); |
2164 | ubifs_err("error %d while processing entry node and " | 2145 | ubifs_err("error %d while processing entry node and trying to find parent inode node %lu", |
2165 | "trying to find parent inode node %lu", | ||
2166 | err, (unsigned long)inum); | 2146 | err, (unsigned long)inum); |
2167 | goto out_dump; | 2147 | goto out_dump; |
2168 | } | 2148 | } |
@@ -2252,61 +2232,52 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd) | |||
2252 | */ | 2232 | */ |
2253 | if (fscki->inum != UBIFS_ROOT_INO && | 2233 | if (fscki->inum != UBIFS_ROOT_INO && |
2254 | fscki->references != 1) { | 2234 | fscki->references != 1) { |
2255 | ubifs_err("directory inode %lu has %d " | 2235 | ubifs_err("directory inode %lu has %d direntries which refer it, but should be 1", |
2256 | "direntries which refer it, but " | ||
2257 | "should be 1", | ||
2258 | (unsigned long)fscki->inum, | 2236 | (unsigned long)fscki->inum, |
2259 | fscki->references); | 2237 | fscki->references); |
2260 | goto out_dump; | 2238 | goto out_dump; |
2261 | } | 2239 | } |
2262 | if (fscki->inum == UBIFS_ROOT_INO && | 2240 | if (fscki->inum == UBIFS_ROOT_INO && |
2263 | fscki->references != 0) { | 2241 | fscki->references != 0) { |
2264 | ubifs_err("root inode %lu has non-zero (%d) " | 2242 | ubifs_err("root inode %lu has non-zero (%d) direntries which refer it", |
2265 | "direntries which refer it", | ||
2266 | (unsigned long)fscki->inum, | 2243 | (unsigned long)fscki->inum, |
2267 | fscki->references); | 2244 | fscki->references); |
2268 | goto out_dump; | 2245 | goto out_dump; |
2269 | } | 2246 | } |
2270 | if (fscki->calc_sz != fscki->size) { | 2247 | if (fscki->calc_sz != fscki->size) { |
2271 | ubifs_err("directory inode %lu size is %lld, " | 2248 | ubifs_err("directory inode %lu size is %lld, but calculated size is %lld", |
2272 | "but calculated size is %lld", | ||
2273 | (unsigned long)fscki->inum, | 2249 | (unsigned long)fscki->inum, |
2274 | fscki->size, fscki->calc_sz); | 2250 | fscki->size, fscki->calc_sz); |
2275 | goto out_dump; | 2251 | goto out_dump; |
2276 | } | 2252 | } |
2277 | if (fscki->calc_cnt != fscki->nlink) { | 2253 | if (fscki->calc_cnt != fscki->nlink) { |
2278 | ubifs_err("directory inode %lu nlink is %d, " | 2254 | ubifs_err("directory inode %lu nlink is %d, but calculated nlink is %d", |
2279 | "but calculated nlink is %d", | ||
2280 | (unsigned long)fscki->inum, | 2255 | (unsigned long)fscki->inum, |
2281 | fscki->nlink, fscki->calc_cnt); | 2256 | fscki->nlink, fscki->calc_cnt); |
2282 | goto out_dump; | 2257 | goto out_dump; |
2283 | } | 2258 | } |
2284 | } else { | 2259 | } else { |
2285 | if (fscki->references != fscki->nlink) { | 2260 | if (fscki->references != fscki->nlink) { |
2286 | ubifs_err("inode %lu nlink is %d, but " | 2261 | ubifs_err("inode %lu nlink is %d, but calculated nlink is %d", |
2287 | "calculated nlink is %d", | ||
2288 | (unsigned long)fscki->inum, | 2262 | (unsigned long)fscki->inum, |
2289 | fscki->nlink, fscki->references); | 2263 | fscki->nlink, fscki->references); |
2290 | goto out_dump; | 2264 | goto out_dump; |
2291 | } | 2265 | } |
2292 | } | 2266 | } |
2293 | if (fscki->xattr_sz != fscki->calc_xsz) { | 2267 | if (fscki->xattr_sz != fscki->calc_xsz) { |
2294 | ubifs_err("inode %lu has xattr size %u, but " | 2268 | ubifs_err("inode %lu has xattr size %u, but calculated size is %lld", |
2295 | "calculated size is %lld", | ||
2296 | (unsigned long)fscki->inum, fscki->xattr_sz, | 2269 | (unsigned long)fscki->inum, fscki->xattr_sz, |
2297 | fscki->calc_xsz); | 2270 | fscki->calc_xsz); |
2298 | goto out_dump; | 2271 | goto out_dump; |
2299 | } | 2272 | } |
2300 | if (fscki->xattr_cnt != fscki->calc_xcnt) { | 2273 | if (fscki->xattr_cnt != fscki->calc_xcnt) { |
2301 | ubifs_err("inode %lu has %u xattrs, but " | 2274 | ubifs_err("inode %lu has %u xattrs, but calculated count is %lld", |
2302 | "calculated count is %lld", | ||
2303 | (unsigned long)fscki->inum, | 2275 | (unsigned long)fscki->inum, |
2304 | fscki->xattr_cnt, fscki->calc_xcnt); | 2276 | fscki->xattr_cnt, fscki->calc_xcnt); |
2305 | goto out_dump; | 2277 | goto out_dump; |
2306 | } | 2278 | } |
2307 | if (fscki->xattr_nms != fscki->calc_xnms) { | 2279 | if (fscki->xattr_nms != fscki->calc_xnms) { |
2308 | ubifs_err("inode %lu has xattr names' size %u, but " | 2280 | ubifs_err("inode %lu has xattr names' size %u, but calculated names' size is %lld", |
2309 | "calculated names' size is %lld", | ||
2310 | (unsigned long)fscki->inum, fscki->xattr_nms, | 2281 | (unsigned long)fscki->inum, fscki->xattr_nms, |
2311 | fscki->calc_xnms); | 2282 | fscki->calc_xnms); |
2312 | goto out_dump; | 2283 | goto out_dump; |
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index c95681cf1b71..e271fba1651b 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -980,8 +980,8 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
980 | * separately. | 980 | * separately. |
981 | */ | 981 | */ |
982 | 982 | ||
983 | dbg_gen("dent '%.*s' ino %lu in dir ino %lu to dent '%.*s' in " | 983 | dbg_gen("dent '%.*s' ino %lu in dir ino %lu to dent '%.*s' in dir ino %lu", |
984 | "dir ino %lu", old_dentry->d_name.len, old_dentry->d_name.name, | 984 | old_dentry->d_name.len, old_dentry->d_name.name, |
985 | old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, | 985 | old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, |
986 | new_dentry->d_name.name, new_dir->i_ino); | 986 | new_dentry->d_name.name, new_dir->i_ino); |
987 | ubifs_assert(mutex_is_locked(&old_dir->i_mutex)); | 987 | ubifs_assert(mutex_is_locked(&old_dir->i_mutex)); |
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 7bd6e72afd11..ff48c5a85309 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -1486,8 +1486,8 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, | |||
1486 | err = ubifs_budget_space(c, &req); | 1486 | err = ubifs_budget_space(c, &req); |
1487 | if (unlikely(err)) { | 1487 | if (unlikely(err)) { |
1488 | if (err == -ENOSPC) | 1488 | if (err == -ENOSPC) |
1489 | ubifs_warn("out of space for mmapped file " | 1489 | ubifs_warn("out of space for mmapped file (inode number %lu)", |
1490 | "(inode number %lu)", inode->i_ino); | 1490 | inode->i_ino); |
1491 | return VM_FAULT_SIGBUS; | 1491 | return VM_FAULT_SIGBUS; |
1492 | } | 1492 | } |
1493 | 1493 | ||
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index 04dd6f47635e..76ca53cd3eee 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c | |||
@@ -714,9 +714,9 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway) | |||
714 | break; | 714 | break; |
715 | } | 715 | } |
716 | 716 | ||
717 | dbg_gc("found LEB %d: free %d, dirty %d, sum %d " | 717 | dbg_gc("found LEB %d: free %d, dirty %d, sum %d (min. space %d)", |
718 | "(min. space %d)", lp.lnum, lp.free, lp.dirty, | 718 | lp.lnum, lp.free, lp.dirty, lp.free + lp.dirty, |
719 | lp.free + lp.dirty, min_space); | 719 | min_space); |
720 | 720 | ||
721 | space_before = c->leb_size - wbuf->offs - wbuf->used; | 721 | space_before = c->leb_size - wbuf->offs - wbuf->used; |
722 | if (wbuf->lnum == -1) | 722 | if (wbuf->lnum == -1) |
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index c80b15d6c8de..36bd4efd0819 100644 --- a/fs/ubifs/log.c +++ b/fs/ubifs/log.c | |||
@@ -315,17 +315,15 @@ static void remove_buds(struct ubifs_info *c) | |||
315 | * heads (non-closed buds). | 315 | * heads (non-closed buds). |
316 | */ | 316 | */ |
317 | c->cmt_bud_bytes += wbuf->offs - bud->start; | 317 | c->cmt_bud_bytes += wbuf->offs - bud->start; |
318 | dbg_log("preserve %d:%d, jhead %s, bud bytes %d, " | 318 | dbg_log("preserve %d:%d, jhead %s, bud bytes %d, cmt_bud_bytes %lld", |
319 | "cmt_bud_bytes %lld", bud->lnum, bud->start, | 319 | bud->lnum, bud->start, dbg_jhead(bud->jhead), |
320 | dbg_jhead(bud->jhead), wbuf->offs - bud->start, | 320 | wbuf->offs - bud->start, c->cmt_bud_bytes); |
321 | c->cmt_bud_bytes); | ||
322 | bud->start = wbuf->offs; | 321 | bud->start = wbuf->offs; |
323 | } else { | 322 | } else { |
324 | c->cmt_bud_bytes += c->leb_size - bud->start; | 323 | c->cmt_bud_bytes += c->leb_size - bud->start; |
325 | dbg_log("remove %d:%d, jhead %s, bud bytes %d, " | 324 | dbg_log("remove %d:%d, jhead %s, bud bytes %d, cmt_bud_bytes %lld", |
326 | "cmt_bud_bytes %lld", bud->lnum, bud->start, | 325 | bud->lnum, bud->start, dbg_jhead(bud->jhead), |
327 | dbg_jhead(bud->jhead), c->leb_size - bud->start, | 326 | c->leb_size - bud->start, c->cmt_bud_bytes); |
328 | c->cmt_bud_bytes); | ||
329 | rb_erase(p1, &c->buds); | 327 | rb_erase(p1, &c->buds); |
330 | /* | 328 | /* |
331 | * If the commit does not finish, the recovery will need | 329 | * If the commit does not finish, the recovery will need |
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index 86eb8e533249..132b8e3e7b0b 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c | |||
@@ -867,15 +867,15 @@ int dbg_check_cats(struct ubifs_info *c) | |||
867 | 867 | ||
868 | list_for_each_entry(lprops, &c->empty_list, list) { | 868 | list_for_each_entry(lprops, &c->empty_list, list) { |
869 | if (lprops->free != c->leb_size) { | 869 | if (lprops->free != c->leb_size) { |
870 | ubifs_err("non-empty LEB %d on empty list " | 870 | ubifs_err("non-empty LEB %d on empty list (free %d dirty %d flags %d)", |
871 | "(free %d dirty %d flags %d)", lprops->lnum, | 871 | lprops->lnum, lprops->free, lprops->dirty, |
872 | lprops->free, lprops->dirty, lprops->flags); | 872 | lprops->flags); |
873 | return -EINVAL; | 873 | return -EINVAL; |
874 | } | 874 | } |
875 | if (lprops->flags & LPROPS_TAKEN) { | 875 | if (lprops->flags & LPROPS_TAKEN) { |
876 | ubifs_err("taken LEB %d on empty list " | 876 | ubifs_err("taken LEB %d on empty list (free %d dirty %d flags %d)", |
877 | "(free %d dirty %d flags %d)", lprops->lnum, | 877 | lprops->lnum, lprops->free, lprops->dirty, |
878 | lprops->free, lprops->dirty, lprops->flags); | 878 | lprops->flags); |
879 | return -EINVAL; | 879 | return -EINVAL; |
880 | } | 880 | } |
881 | } | 881 | } |
@@ -883,15 +883,15 @@ int dbg_check_cats(struct ubifs_info *c) | |||
883 | i = 0; | 883 | i = 0; |
884 | list_for_each_entry(lprops, &c->freeable_list, list) { | 884 | list_for_each_entry(lprops, &c->freeable_list, list) { |
885 | if (lprops->free + lprops->dirty != c->leb_size) { | 885 | if (lprops->free + lprops->dirty != c->leb_size) { |
886 | ubifs_err("non-freeable LEB %d on freeable list " | 886 | ubifs_err("non-freeable LEB %d on freeable list (free %d dirty %d flags %d)", |
887 | "(free %d dirty %d flags %d)", lprops->lnum, | 887 | lprops->lnum, lprops->free, lprops->dirty, |
888 | lprops->free, lprops->dirty, lprops->flags); | 888 | lprops->flags); |
889 | return -EINVAL; | 889 | return -EINVAL; |
890 | } | 890 | } |
891 | if (lprops->flags & LPROPS_TAKEN) { | 891 | if (lprops->flags & LPROPS_TAKEN) { |
892 | ubifs_err("taken LEB %d on freeable list " | 892 | ubifs_err("taken LEB %d on freeable list (free %d dirty %d flags %d)", |
893 | "(free %d dirty %d flags %d)", lprops->lnum, | 893 | lprops->lnum, lprops->free, lprops->dirty, |
894 | lprops->free, lprops->dirty, lprops->flags); | 894 | lprops->flags); |
895 | return -EINVAL; | 895 | return -EINVAL; |
896 | } | 896 | } |
897 | i += 1; | 897 | i += 1; |
@@ -913,21 +913,21 @@ int dbg_check_cats(struct ubifs_info *c) | |||
913 | 913 | ||
914 | list_for_each_entry(lprops, &c->frdi_idx_list, list) { | 914 | list_for_each_entry(lprops, &c->frdi_idx_list, list) { |
915 | if (lprops->free + lprops->dirty != c->leb_size) { | 915 | if (lprops->free + lprops->dirty != c->leb_size) { |
916 | ubifs_err("non-freeable LEB %d on frdi_idx list " | 916 | ubifs_err("non-freeable LEB %d on frdi_idx list (free %d dirty %d flags %d)", |
917 | "(free %d dirty %d flags %d)", lprops->lnum, | 917 | lprops->lnum, lprops->free, lprops->dirty, |
918 | lprops->free, lprops->dirty, lprops->flags); | 918 | lprops->flags); |
919 | return -EINVAL; | 919 | return -EINVAL; |
920 | } | 920 | } |
921 | if (lprops->flags & LPROPS_TAKEN) { | 921 | if (lprops->flags & LPROPS_TAKEN) { |
922 | ubifs_err("taken LEB %d on frdi_idx list " | 922 | ubifs_err("taken LEB %d on frdi_idx list (free %d dirty %d flags %d)", |
923 | "(free %d dirty %d flags %d)", lprops->lnum, | 923 | lprops->lnum, lprops->free, lprops->dirty, |
924 | lprops->free, lprops->dirty, lprops->flags); | 924 | lprops->flags); |
925 | return -EINVAL; | 925 | return -EINVAL; |
926 | } | 926 | } |
927 | if (!(lprops->flags & LPROPS_INDEX)) { | 927 | if (!(lprops->flags & LPROPS_INDEX)) { |
928 | ubifs_err("non-index LEB %d on frdi_idx list " | 928 | ubifs_err("non-index LEB %d on frdi_idx list (free %d dirty %d flags %d)", |
929 | "(free %d dirty %d flags %d)", lprops->lnum, | 929 | lprops->lnum, lprops->free, lprops->dirty, |
930 | lprops->free, lprops->dirty, lprops->flags); | 930 | lprops->flags); |
931 | return -EINVAL; | 931 | return -EINVAL; |
932 | } | 932 | } |
933 | } | 933 | } |
@@ -1153,8 +1153,8 @@ static int scan_check_cb(struct ubifs_info *c, | |||
1153 | 1153 | ||
1154 | if (free > c->leb_size || free < 0 || dirty > c->leb_size || | 1154 | if (free > c->leb_size || free < 0 || dirty > c->leb_size || |
1155 | dirty < 0) { | 1155 | dirty < 0) { |
1156 | ubifs_err("bad calculated accounting for LEB %d: " | 1156 | ubifs_err("bad calculated accounting for LEB %d: free %d, dirty %d", |
1157 | "free %d, dirty %d", lnum, free, dirty); | 1157 | lnum, free, dirty); |
1158 | goto out_destroy; | 1158 | goto out_destroy; |
1159 | } | 1159 | } |
1160 | 1160 | ||
@@ -1200,8 +1200,7 @@ static int scan_check_cb(struct ubifs_info *c, | |||
1200 | /* Free but not unmapped LEB, it's fine */ | 1200 | /* Free but not unmapped LEB, it's fine */ |
1201 | is_idx = 0; | 1201 | is_idx = 0; |
1202 | else { | 1202 | else { |
1203 | ubifs_err("indexing node without indexing " | 1203 | ubifs_err("indexing node without indexing flag"); |
1204 | "flag"); | ||
1205 | goto out_print; | 1204 | goto out_print; |
1206 | } | 1205 | } |
1207 | } | 1206 | } |
@@ -1236,8 +1235,7 @@ static int scan_check_cb(struct ubifs_info *c, | |||
1236 | return LPT_SCAN_CONTINUE; | 1235 | return LPT_SCAN_CONTINUE; |
1237 | 1236 | ||
1238 | out_print: | 1237 | out_print: |
1239 | ubifs_err("bad accounting of LEB %d: free %d, dirty %d flags %#x, " | 1238 | ubifs_err("bad accounting of LEB %d: free %d, dirty %d flags %#x, should be free %d, dirty %d", |
1240 | "should be free %d, dirty %d", | ||
1241 | lnum, lp->free, lp->dirty, lp->flags, free, dirty); | 1239 | lnum, lp->free, lp->dirty, lp->flags, free, dirty); |
1242 | ubifs_dump_leb(c, lnum); | 1240 | ubifs_dump_leb(c, lnum); |
1243 | out_destroy: | 1241 | out_destroy: |
@@ -1290,12 +1288,10 @@ int dbg_check_lprops(struct ubifs_info *c) | |||
1290 | lst.total_dirty != c->lst.total_dirty || | 1288 | lst.total_dirty != c->lst.total_dirty || |
1291 | lst.total_used != c->lst.total_used) { | 1289 | lst.total_used != c->lst.total_used) { |
1292 | ubifs_err("bad overall accounting"); | 1290 | ubifs_err("bad overall accounting"); |
1293 | ubifs_err("calculated: empty_lebs %d, idx_lebs %d, " | 1291 | ubifs_err("calculated: empty_lebs %d, idx_lebs %d, total_free %lld, total_dirty %lld, total_used %lld", |
1294 | "total_free %lld, total_dirty %lld, total_used %lld", | ||
1295 | lst.empty_lebs, lst.idx_lebs, lst.total_free, | 1292 | lst.empty_lebs, lst.idx_lebs, lst.total_free, |
1296 | lst.total_dirty, lst.total_used); | 1293 | lst.total_dirty, lst.total_used); |
1297 | ubifs_err("read from lprops: empty_lebs %d, idx_lebs %d, " | 1294 | ubifs_err("read from lprops: empty_lebs %d, idx_lebs %d, total_free %lld, total_dirty %lld, total_used %lld", |
1298 | "total_free %lld, total_dirty %lld, total_used %lld", | ||
1299 | c->lst.empty_lebs, c->lst.idx_lebs, c->lst.total_free, | 1295 | c->lst.empty_lebs, c->lst.idx_lebs, c->lst.total_free, |
1300 | c->lst.total_dirty, c->lst.total_used); | 1296 | c->lst.total_dirty, c->lst.total_used); |
1301 | err = -EINVAL; | 1297 | err = -EINVAL; |
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 8640920766ed..c3e6bbf13ba5 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c | |||
@@ -2237,8 +2237,7 @@ int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode, | |||
2237 | /* cnode is a nnode */ | 2237 | /* cnode is a nnode */ |
2238 | num = calc_nnode_num(row, col); | 2238 | num = calc_nnode_num(row, col); |
2239 | if (cnode->num != num) { | 2239 | if (cnode->num != num) { |
2240 | ubifs_err("nnode num %d expected %d " | 2240 | ubifs_err("nnode num %d expected %d parent num %d iip %d", |
2241 | "parent num %d iip %d", | ||
2242 | cnode->num, num, | 2241 | cnode->num, num, |
2243 | (nnode ? nnode->num : 0), cnode->iip); | 2242 | (nnode ? nnode->num : 0), cnode->iip); |
2244 | return -EINVAL; | 2243 | return -EINVAL; |
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 4fa70734e6e7..74082553e1fc 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -320,8 +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 at LEB %d:%d needing %d, done_ltab %d, " | 323 | ubifs_err("LPT out of space at LEB %d:%d needing %d, done_ltab %d, done_lsave %d", |
324 | "done_lsave %d", lnum, offs, len, done_ltab, done_lsave); | 324 | lnum, offs, len, done_ltab, done_lsave); |
325 | ubifs_dump_lpt_info(c); | 325 | ubifs_dump_lpt_info(c); |
326 | ubifs_dump_lpt_lebs(c); | 326 | ubifs_dump_lpt_lebs(c); |
327 | dump_stack(); | 327 | dump_stack(); |
@@ -545,8 +545,8 @@ static int write_cnodes(struct ubifs_info *c) | |||
545 | return 0; | 545 | return 0; |
546 | 546 | ||
547 | no_space: | 547 | no_space: |
548 | ubifs_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " | 548 | ubifs_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab %d, done_lsave %d", |
549 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); | 549 | lnum, offs, len, done_ltab, done_lsave); |
550 | ubifs_dump_lpt_info(c); | 550 | ubifs_dump_lpt_info(c); |
551 | ubifs_dump_lpt_lebs(c); | 551 | ubifs_dump_lpt_lebs(c); |
552 | dump_stack(); | 552 | dump_stack(); |
@@ -1668,14 +1668,12 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum) | |||
1668 | } | 1668 | } |
1669 | i = lnum - c->lpt_first; | 1669 | i = lnum - c->lpt_first; |
1670 | if (len != c->ltab[i].free) { | 1670 | if (len != c->ltab[i].free) { |
1671 | dbg_msg("invalid free space in LEB %d " | 1671 | dbg_msg("invalid free space in LEB %d (free %d, expected %d)", |
1672 | "(free %d, expected %d)", | ||
1673 | lnum, len, c->ltab[i].free); | 1672 | lnum, len, c->ltab[i].free); |
1674 | err = -EINVAL; | 1673 | err = -EINVAL; |
1675 | } | 1674 | } |
1676 | if (dirty != c->ltab[i].dirty) { | 1675 | if (dirty != c->ltab[i].dirty) { |
1677 | dbg_msg("invalid dirty space in LEB %d " | 1676 | dbg_msg("invalid dirty space in LEB %d (dirty %d, expected %d)", |
1678 | "(dirty %d, expected %d)", | ||
1679 | lnum, dirty, c->ltab[i].dirty); | 1677 | lnum, dirty, c->ltab[i].dirty); |
1680 | err = -EINVAL; | 1678 | err = -EINVAL; |
1681 | } | 1679 | } |
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c index cebf17ea0458..769701ccb5c9 100644 --- a/fs/ubifs/orphan.c +++ b/fs/ubifs/orphan.c | |||
@@ -562,8 +562,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
562 | 562 | ||
563 | list_for_each_entry(snod, &sleb->nodes, list) { | 563 | list_for_each_entry(snod, &sleb->nodes, list) { |
564 | if (snod->type != UBIFS_ORPH_NODE) { | 564 | if (snod->type != UBIFS_ORPH_NODE) { |
565 | ubifs_err("invalid node type %d in orphan area at " | 565 | ubifs_err("invalid node type %d in orphan area at %d:%d", |
566 | "%d:%d", snod->type, sleb->lnum, snod->offs); | 566 | snod->type, sleb->lnum, snod->offs); |
567 | ubifs_dump_node(c, snod->node); | 567 | ubifs_dump_node(c, snod->node); |
568 | return -EINVAL; | 568 | return -EINVAL; |
569 | } | 569 | } |
@@ -589,8 +589,7 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
589 | * number. That makes this orphan node, out of date. | 589 | * number. That makes this orphan node, out of date. |
590 | */ | 590 | */ |
591 | if (!first) { | 591 | if (!first) { |
592 | ubifs_err("out of order commit number %llu in " | 592 | ubifs_err("out of order commit number %llu in orphan node at %d:%d", |
593 | "orphan node at %d:%d", | ||
594 | cmt_no, sleb->lnum, snod->offs); | 593 | cmt_no, sleb->lnum, snod->offs); |
595 | ubifs_dump_node(c, snod->node); | 594 | ubifs_dump_node(c, snod->node); |
596 | return -EINVAL; | 595 | return -EINVAL; |
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index edeec499c048..065096e36ed9 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c | |||
@@ -609,7 +609,8 @@ static void drop_last_node(struct ubifs_scan_leb *sleb, int *offs) | |||
609 | snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, | 609 | snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, |
610 | list); | 610 | list); |
611 | 611 | ||
612 | dbg_rcvry("dropping last node at %d:%d", sleb->lnum, snod->offs); | 612 | dbg_rcvry("dropping last node at %d:%d", |
613 | sleb->lnum, snod->offs); | ||
613 | *offs = snod->offs; | 614 | *offs = snod->offs; |
614 | list_del(&snod->list); | 615 | list_del(&snod->list); |
615 | kfree(snod); | 616 | kfree(snod); |
@@ -702,8 +703,8 @@ struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum, | |||
702 | * See header comment for this file for more | 703 | * See header comment for this file for more |
703 | * explanations about the reasons we have this check. | 704 | * explanations about the reasons we have this check. |
704 | */ | 705 | */ |
705 | ubifs_err("corrupt empty space LEB %d:%d, corruption " | 706 | ubifs_err("corrupt empty space LEB %d:%d, corruption starts at %d", |
706 | "starts at %d", lnum, offs, corruption); | 707 | lnum, offs, corruption); |
707 | /* Make sure we dump interesting non-0xFF data */ | 708 | /* Make sure we dump interesting non-0xFF data */ |
708 | offs += corruption; | 709 | offs += corruption; |
709 | buf += corruption; | 710 | buf += corruption; |
@@ -899,8 +900,8 @@ struct ubifs_scan_leb *ubifs_recover_log_leb(struct ubifs_info *c, int lnum, | |||
899 | } | 900 | } |
900 | } | 901 | } |
901 | if (snod->sqnum > cs_sqnum) { | 902 | if (snod->sqnum > cs_sqnum) { |
902 | ubifs_err("unrecoverable log corruption " | 903 | ubifs_err("unrecoverable log corruption in LEB %d", |
903 | "in LEB %d", lnum); | 904 | lnum); |
904 | ubifs_scan_destroy(sleb); | 905 | ubifs_scan_destroy(sleb); |
905 | return ERR_PTR(-EUCLEAN); | 906 | return ERR_PTR(-EUCLEAN); |
906 | } | 907 | } |
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 94d78fc5d4e0..ede6e5835ced 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c | |||
@@ -141,9 +141,9 @@ static int set_bud_lprops(struct ubifs_info *c, struct bud_entry *b) | |||
141 | * during the replay. | 141 | * during the replay. |
142 | */ | 142 | */ |
143 | if (dirty != 0) | 143 | if (dirty != 0) |
144 | dbg_msg("LEB %d lp: %d free %d dirty " | 144 | dbg_msg("LEB %d lp: %d free %d dirty replay: %d free %d dirty", |
145 | "replay: %d free %d dirty", b->bud->lnum, | 145 | b->bud->lnum, lp->free, lp->dirty, b->free, |
146 | lp->free, lp->dirty, b->free, b->dirty); | 146 | b->dirty); |
147 | } | 147 | } |
148 | lp = ubifs_change_lp(c, lp, b->free, dirty + b->dirty, | 148 | lp = ubifs_change_lp(c, lp, b->free, dirty + b->dirty, |
149 | lp->flags | LPROPS_TAKEN, 0); | 149 | lp->flags | LPROPS_TAKEN, 0); |
@@ -677,7 +677,8 @@ static int replay_bud(struct ubifs_info *c, struct bud_entry *b) | |||
677 | 677 | ||
678 | b->dirty = sleb->endpt - offs - used; | 678 | b->dirty = sleb->endpt - offs - used; |
679 | b->free = c->leb_size - sleb->endpt; | 679 | b->free = c->leb_size - sleb->endpt; |
680 | dbg_mnt("bud LEB %d replied: dirty %d, free %d", lnum, b->dirty, b->free); | 680 | dbg_mnt("bud LEB %d replied: dirty %d, free %d", |
681 | lnum, b->dirty, b->free); | ||
681 | 682 | ||
682 | out: | 683 | out: |
683 | ubifs_scan_destroy(sleb); | 684 | ubifs_scan_destroy(sleb); |
@@ -865,8 +866,7 @@ static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) | |||
865 | goto out_dump; | 866 | goto out_dump; |
866 | } | 867 | } |
867 | if (le64_to_cpu(node->cmt_no) != c->cmt_no) { | 868 | if (le64_to_cpu(node->cmt_no) != c->cmt_no) { |
868 | ubifs_err("first CS node at LEB %d:%d has wrong " | 869 | ubifs_err("first CS node at LEB %d:%d has wrong commit number %llu expected %llu", |
869 | "commit number %llu expected %llu", | ||
870 | lnum, offs, | 870 | lnum, offs, |
871 | (unsigned long long)le64_to_cpu(node->cmt_no), | 871 | (unsigned long long)le64_to_cpu(node->cmt_no), |
872 | c->cmt_no); | 872 | c->cmt_no); |
@@ -1058,8 +1058,8 @@ int ubifs_replay_journal(struct ubifs_info *c) | |||
1058 | c->bi.uncommitted_idx *= c->max_idx_node_sz; | 1058 | c->bi.uncommitted_idx *= c->max_idx_node_sz; |
1059 | 1059 | ||
1060 | ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery); | 1060 | ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery); |
1061 | dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, " | 1061 | dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, highest_inum %lu", |
1062 | "highest_inum %lu", c->lhead_lnum, c->lhead_offs, c->max_sqnum, | 1062 | c->lhead_lnum, c->lhead_offs, c->max_sqnum, |
1063 | (unsigned long)c->highest_inum); | 1063 | (unsigned long)c->highest_inum); |
1064 | out: | 1064 | out: |
1065 | destroy_replay_list(c); | 1065 | destroy_replay_list(c); |
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 15e2fc5aa60b..5b7bfa29ec37 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c | |||
@@ -391,9 +391,8 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup) | |||
391 | min_leb_cnt += c->lpt_lebs + c->orph_lebs + c->jhead_cnt + 6; | 391 | min_leb_cnt += c->lpt_lebs + c->orph_lebs + c->jhead_cnt + 6; |
392 | 392 | ||
393 | if (c->leb_cnt < min_leb_cnt || c->leb_cnt > c->vi.size) { | 393 | if (c->leb_cnt < min_leb_cnt || c->leb_cnt > c->vi.size) { |
394 | ubifs_err("bad LEB count: %d in superblock, %d on UBI volume, " | 394 | ubifs_err("bad LEB count: %d in superblock, %d on UBI volume, %d minimum required", |
395 | "%d minimum required", c->leb_cnt, c->vi.size, | 395 | c->leb_cnt, c->vi.size, min_leb_cnt); |
396 | min_leb_cnt); | ||
397 | goto failed; | 396 | goto failed; |
398 | } | 397 | } |
399 | 398 | ||
@@ -411,15 +410,14 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup) | |||
411 | 410 | ||
412 | max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; | 411 | max_bytes = (long long)c->leb_size * UBIFS_MIN_BUD_LEBS; |
413 | if (c->max_bud_bytes < max_bytes) { | 412 | if (c->max_bud_bytes < max_bytes) { |
414 | ubifs_err("too small journal (%lld bytes), must be at least " | 413 | ubifs_err("too small journal (%lld bytes), must be at least %lld bytes", |
415 | "%lld bytes", c->max_bud_bytes, max_bytes); | 414 | c->max_bud_bytes, max_bytes); |
416 | goto failed; | 415 | goto failed; |
417 | } | 416 | } |
418 | 417 | ||
419 | max_bytes = (long long)c->leb_size * c->main_lebs; | 418 | max_bytes = (long long)c->leb_size * c->main_lebs; |
420 | if (c->max_bud_bytes > max_bytes) { | 419 | if (c->max_bud_bytes > max_bytes) { |
421 | ubifs_err("too large journal size (%lld bytes), only %lld bytes" | 420 | ubifs_err("too large journal size (%lld bytes), only %lld bytes available in the main area", |
422 | "available in the main area", | ||
423 | c->max_bud_bytes, max_bytes); | 421 | c->max_bud_bytes, max_bytes); |
424 | goto failed; | 422 | goto failed; |
425 | } | 423 | } |
@@ -549,10 +547,9 @@ int ubifs_read_superblock(struct ubifs_info *c) | |||
549 | ubifs_assert(!c->ro_media || c->ro_mount); | 547 | ubifs_assert(!c->ro_media || c->ro_mount); |
550 | if (!c->ro_mount || | 548 | if (!c->ro_mount || |
551 | c->ro_compat_version > UBIFS_RO_COMPAT_VERSION) { | 549 | c->ro_compat_version > UBIFS_RO_COMPAT_VERSION) { |
552 | ubifs_err("on-flash format version is w%d/r%d, but " | 550 | ubifs_err("on-flash format version is w%d/r%d, but software only supports up to version w%d/r%d", |
553 | "software only supports up to version " | 551 | c->fmt_version, c->ro_compat_version, |
554 | "w%d/r%d", c->fmt_version, | 552 | UBIFS_FORMAT_VERSION, |
555 | c->ro_compat_version, UBIFS_FORMAT_VERSION, | ||
556 | UBIFS_RO_COMPAT_VERSION); | 553 | UBIFS_RO_COMPAT_VERSION); |
557 | if (c->ro_compat_version <= UBIFS_RO_COMPAT_VERSION) { | 554 | if (c->ro_compat_version <= UBIFS_RO_COMPAT_VERSION) { |
558 | ubifs_msg("only R/O mounting is possible"); | 555 | ubifs_msg("only R/O mounting is possible"); |
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 019ca47a1f8e..58aa05df2bb6 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c | |||
@@ -85,7 +85,8 @@ int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, | |||
85 | if (len < UBIFS_CH_SZ) | 85 | if (len < UBIFS_CH_SZ) |
86 | return SCANNED_GARBAGE; | 86 | return SCANNED_GARBAGE; |
87 | 87 | ||
88 | dbg_scan("scanning %s at LEB %d:%d", dbg_ntype(ch->node_type), lnum, offs); | 88 | dbg_scan("scanning %s at LEB %d:%d", |
89 | dbg_ntype(ch->node_type), lnum, offs); | ||
89 | 90 | ||
90 | if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) | 91 | if (ubifs_check_node(c, buf, lnum, offs, quiet, 1)) |
91 | return SCANNED_A_CORRUPT_NODE; | 92 | return SCANNED_A_CORRUPT_NODE; |
@@ -150,8 +151,8 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum, | |||
150 | 151 | ||
151 | err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); | 152 | err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); |
152 | if (err && err != -EBADMSG) { | 153 | if (err && err != -EBADMSG) { |
153 | ubifs_err("cannot read %d bytes from LEB %d:%d," | 154 | ubifs_err("cannot read %d bytes from LEB %d:%d, error %d", |
154 | " error %d", c->leb_size - offs, lnum, offs, err); | 155 | c->leb_size - offs, lnum, offs, err); |
155 | kfree(sleb); | 156 | kfree(sleb); |
156 | return ERR_PTR(err); | 157 | return ERR_PTR(err); |
157 | } | 158 | } |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index d31928975cc8..448bf24ef8d0 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -89,9 +89,8 @@ static int validate_inode(struct ubifs_info *c, const struct inode *inode) | |||
89 | return 5; | 89 | return 5; |
90 | 90 | ||
91 | if (!ubifs_compr_present(ui->compr_type)) { | 91 | if (!ubifs_compr_present(ui->compr_type)) { |
92 | ubifs_warn("inode %lu uses '%s' compression, but it was not " | 92 | ubifs_warn("inode %lu uses '%s' compression, but it was not compiled in", |
93 | "compiled in", inode->i_ino, | 93 | inode->i_ino, ubifs_compr_name(ui->compr_type)); |
94 | ubifs_compr_name(ui->compr_type)); | ||
95 | } | 94 | } |
96 | 95 | ||
97 | err = dbg_check_dir(c, inode); | 96 | err = dbg_check_dir(c, inode); |
@@ -1061,8 +1060,8 @@ static int ubifs_parse_options(struct ubifs_info *c, char *options, | |||
1061 | 1060 | ||
1062 | flag = parse_standard_option(p); | 1061 | flag = parse_standard_option(p); |
1063 | if (!flag) { | 1062 | if (!flag) { |
1064 | ubifs_err("unrecognized mount option \"%s\" " | 1063 | ubifs_err("unrecognized mount option \"%s\" or missing value", |
1065 | "or missing value", p); | 1064 | p); |
1066 | return -EINVAL; | 1065 | return -EINVAL; |
1067 | } | 1066 | } |
1068 | sb->s_flags |= flag; | 1067 | sb->s_flags |= flag; |
@@ -1124,8 +1123,8 @@ again: | |||
1124 | } | 1123 | } |
1125 | 1124 | ||
1126 | /* Just disable bulk-read */ | 1125 | /* Just disable bulk-read */ |
1127 | ubifs_warn("Cannot allocate %d bytes of memory for bulk-read, " | 1126 | ubifs_warn("cannot allocate %d bytes of memory for bulk-read, disabling it", |
1128 | "disabling it", c->max_bu_buf_len); | 1127 | c->max_bu_buf_len); |
1129 | c->mount_opts.bulk_read = 1; | 1128 | c->mount_opts.bulk_read = 1; |
1130 | c->bulk_read = 0; | 1129 | c->bulk_read = 0; |
1131 | return; | 1130 | return; |
@@ -1416,11 +1415,11 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1416 | if (c->ro_mount) | 1415 | if (c->ro_mount) |
1417 | ubifs_msg("mounted read-only"); | 1416 | ubifs_msg("mounted read-only"); |
1418 | x = (long long)c->main_lebs * c->leb_size; | 1417 | x = (long long)c->main_lebs * c->leb_size; |
1419 | ubifs_msg("file system size: %lld bytes (%lld KiB, %lld MiB, %d " | 1418 | ubifs_msg("file system size: %lld bytes (%lld KiB, %lld MiB, %d LEBs)", |
1420 | "LEBs)", x, x >> 10, x >> 20, c->main_lebs); | 1419 | x, x >> 10, x >> 20, c->main_lebs); |
1421 | x = (long long)c->log_lebs * c->leb_size + c->max_bud_bytes; | 1420 | x = (long long)c->log_lebs * c->leb_size + c->max_bud_bytes; |
1422 | ubifs_msg("journal size: %lld bytes (%lld KiB, %lld MiB, %d " | 1421 | ubifs_msg("journal size: %lld bytes (%lld KiB, %lld MiB, %d LEBs)", |
1423 | "LEBs)", x, x >> 10, x >> 20, c->log_lebs + c->max_bud_cnt); | 1422 | x, x >> 10, x >> 20, c->log_lebs + c->max_bud_cnt); |
1424 | ubifs_msg("media format: w%d/r%d (latest is w%d/r%d)", | 1423 | ubifs_msg("media format: w%d/r%d (latest is w%d/r%d)", |
1425 | c->fmt_version, c->ro_compat_version, | 1424 | c->fmt_version, c->ro_compat_version, |
1426 | UBIFS_FORMAT_VERSION, UBIFS_RO_COMPAT_VERSION); | 1425 | UBIFS_FORMAT_VERSION, UBIFS_RO_COMPAT_VERSION); |
@@ -1563,10 +1562,9 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1563 | 1562 | ||
1564 | if (c->rw_incompat) { | 1563 | if (c->rw_incompat) { |
1565 | ubifs_err("the file-system is not R/W-compatible"); | 1564 | ubifs_err("the file-system is not R/W-compatible"); |
1566 | ubifs_msg("on-flash format version is w%d/r%d, but software " | 1565 | ubifs_msg("on-flash format version is w%d/r%d, but software only supports up to version w%d/r%d", |
1567 | "only supports up to version w%d/r%d", c->fmt_version, | 1566 | c->fmt_version, c->ro_compat_version, |
1568 | c->ro_compat_version, UBIFS_FORMAT_VERSION, | 1567 | UBIFS_FORMAT_VERSION, UBIFS_RO_COMPAT_VERSION); |
1569 | UBIFS_RO_COMPAT_VERSION); | ||
1570 | return -EROFS; | 1568 | return -EROFS; |
1571 | } | 1569 | } |
1572 | 1570 | ||
@@ -1827,8 +1825,8 @@ static void ubifs_put_super(struct super_block *sb) | |||
1827 | * next mount, so we just print a message and | 1825 | * next mount, so we just print a message and |
1828 | * continue to unmount normally. | 1826 | * continue to unmount normally. |
1829 | */ | 1827 | */ |
1830 | ubifs_err("failed to write master node, " | 1828 | ubifs_err("failed to write master node, error %d", |
1831 | "error %d", err); | 1829 | err); |
1832 | } else { | 1830 | } else { |
1833 | for (i = 0; i < c->jhead_cnt; i++) | 1831 | for (i = 0; i < c->jhead_cnt; i++) |
1834 | /* Make sure write-buffer timers are canceled */ | 1832 | /* Make sure write-buffer timers are canceled */ |
@@ -2247,8 +2245,7 @@ static int __init ubifs_init(void) | |||
2247 | * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2. | 2245 | * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2. |
2248 | */ | 2246 | */ |
2249 | if (PAGE_CACHE_SIZE < UBIFS_BLOCK_SIZE) { | 2247 | if (PAGE_CACHE_SIZE < UBIFS_BLOCK_SIZE) { |
2250 | ubifs_err("VFS page cache size is %u bytes, but UBIFS requires" | 2248 | ubifs_err("VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes", |
2251 | " at least 4096 bytes", | ||
2252 | (unsigned int)PAGE_CACHE_SIZE); | 2249 | (unsigned int)PAGE_CACHE_SIZE); |
2253 | return -EINVAL; | 2250 | return -EINVAL; |
2254 | } | 2251 | } |