From: Artem Bityutskiy <dedekind1@gmail.com>
To: Darwin Rambo <drambo@broadcom.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS read-only rootfs needs 1 or more eraseblocks to mount
Date: Wed, 09 Dec 2009 12:16:28 +0200 [thread overview]
Message-ID: <1260353788.19669.1265.camel@localhost> (raw)
In-Reply-To: <B125D8217ABC4B43826503DE00A2D44910DFAAE18A@SJEXCHCCR01.corp.ad.broadcom.com>
On Tue, 2009-12-08 at 16:09 -0800, Darwin Rambo wrote:
> On a read-only UBIFS rootfs, why do you need at least 1 eraseblock?
> There is nothing to replace since nothing is ever written to this
> partition on the fly and a block that goes bad cannot be recovered
> anyways?
>
> UBI error: ubi_eba_init_scan: no enough physical eraseblocks (0, need
> 1)
> UBI error: ubi_init: cannot attach mtd6
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -28
This is UBI error, not UBIFS. UBI does not really have a notion of
read-only UBI device, so it always reserves some amount of eraseblocks.
There is a compile-time option about amount of eraseblocks to reserve,
in percent. You can make it 0%, then UBI will not reserve anything.
Probably it will not work out of the box (I never tried that), and
you'll need to do some small investigation / fixing.
> Note that adding room for a single bad block PEB allows the mount to
> work, and you get a warning like this:
> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad
> PEB handling, reserved 0, need 19"
This is again UBI warning, not UBIFS.
> It looks like the normal read/write code is reserving/requiring blocks
> that the read-only mode doesn't actually use?
R/O stuff is on UBIFS level, you get warning at UBI level, and UBI does
assumes everything is R/W.
> All this is probably just a future suggestion to support read-only
> mode a little bit better with less block wastage.
Ok, you might as well just come up with a patch or patches!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2009-12-09 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 0:09 UBIFS read-only rootfs needs 1 or more eraseblocks to mount Darwin Rambo
2009-12-09 10:16 ` Artem Bityutskiy [this message]
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=1260353788.19669.1265.camel@localhost \
--to=dedekind1@gmail.com \
--cc=drambo@broadcom.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