public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magellan-technology.com>
To: Adrian Hunter <adrian.hunter@nokia.com>
Cc: "Bityutskiy Artem \(Nokia-M/Helsinki\)"
	<Artem.Bityutskiy@nokia.com>,
	MTD-LIST <linux-mtd@lists.infradead.org>
Subject: Re: ubifs mount problem: UBIFS error (pid 1152): validate_sb: bad superblock, error 8
Date: Fri, 21 Aug 2009 12:05:00 +1000	[thread overview]
Message-ID: <ed62800908201905nc1bd812u7f3c0f67bc01ef23@mail.gmail.com> (raw)
In-Reply-To: <4A8D2F10.1050902@nokia.com>

On Thu, Aug 20, 2009 at 9:10 PM, Adrian Hunter<adrian.hunter@nokia.com> wrote:
> Aras Vaichas wrote:
>
>> /root # mount -t ubifs ubi1:spareubi /mnt
>> UBIFS error (pid 823): validate_sb: bad superblock, error 8
>> mount: mounting ubi1:spareubi on /mnt failed: Invalid argument
>
> The journal is too big for the partition - see below where it
> says:
>
> UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
>
> You will need to force the journal smaller using mkfs.ubifs -j
> option.

Yes, that works.

I see my problem now. From mkfs.ubifs.c:

        /* Make the journal about 12.5% of main area lebs */
        c->max_bud_bytes = (lebs / 8) * (long long)c->leb_size;
        /* Make the max journal size 8MiB */
        if (c->max_bud_bytes > 8 * 1024 * 1024)
            c->max_bud_bytes = 8 * 1024 * 1024;
        if (c->max_bud_bytes < 4 * c->leb_size)
            c->max_bud_bytes = 4 * c->leb_size;

The journal size is calculated based on the maximum FS size.

This means that the *minimum" ubifs size is a function of the
*maximum* UBIFS size.  Interesting.

I chose an 8MB partition because I'm doing a lot of testing for a
factory/production flashing system, so I don't want to wait long while
I go through lots of erase/write/attach/mount cycles. Since this is
unusual, I won't worry too much about it.

Would there be a benefit to set a small fixed journal size, regardless
of UBIFS maximum size, for embedded systems?

Aras

  reply	other threads:[~2009-08-21  2:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20  3:59 ubifs mount problem: UBIFS error (pid 1152): validate_sb: bad superblock, error 8 Aras Vaichas
2009-08-20 11:10 ` Adrian Hunter
2009-08-21  2:05   ` Aras Vaichas [this message]
2009-08-21  5:41     ` Artem Bityutskiy
2009-08-21  4:59 ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed62800908201905nc1bd812u7f3c0f67bc01ef23@mail.gmail.com \
    --to=arasv@magellan-technology.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=adrian.hunter@nokia.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox