aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 23:47:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 23:47:48 -0400
commit782c3fb22baa103abbcd30dfc99cad24bb09f1df (patch)
treeacda25cba653a55497f8030323437527258e747f /fs/ubifs/sb.c
parent60c7b4df82d0ec44fe10487eadec737abea55b34 (diff)
parent3668b70fcf1fdc6799abf15f70fe3f50f407ec82 (diff)
Merge tag 'upstream-3.7-rc1' of git://git.infradead.org/linux-ubifs
Pull ubifs changes from Artem Bityutskiy: "No big changes for 3.7 in UBIFS: - Error reporting and debug printing improvements - Power cut emulation fixes - Minor cleanups" Fix trivial conflict in fs/ubifs/debug.c due to the user namespace changes. * tag 'upstream-3.7-rc1' of git://git.infradead.org/linux-ubifs: UBIFS: print less UBIFS: use pr_ helper instead of printk UBIFS: comply with coding style UBIFS: use __aligned() attribute UBIFS: remove __DATE__ and __TIME__ UBIFS: fix power cut emulation for mtdram UBIFS: improve scanning debug output UBIFS: always print full error reports UBIFS: print PID in debug messages
Diffstat (limited to 'fs/ubifs/sb.c')
-rw-r--r--fs/ubifs/sb.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 52c21f4190f6..4c37607a958e 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");