From: Richard Weinberger <richard@nod.at>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: Fastmap and Atmel sam-ba
Date: Mon, 26 Aug 2013 16:44:11 +0200 [thread overview]
Message-ID: <521B69BB.6000808@nod.at> (raw)
In-Reply-To: <CACQ1gAjAV-5PX_-YD7JR5uSeaXaUEu1KofLsoeZq+j=64DyifA@mail.gmail.com>
Am 26.08.2013 11:31, schrieb Richard Genoud:
> 2013/8/23 Richard Weinberger <richard@nod.at>:
>> Hi again,
>>
>> I have an idea what's going on. As you are using a real (and rather slow) NAND device
>> erasing PEBs takes some time.
>> If you attach the very first time from an image created by ubinize UBI has to erase
>> all PEBs, parallel to that UBIFS requests one PEB but does not get one.
>> In this case UBI has to erase one PEB in sync-mode.
>>
>> I have only nandsim, which is far to fast to hit that bug.
>> Who wants to donate me a board with NAND memory? ;-)
>>
>> Anyway, can you please test the attached patch?
> To answer your previous question, yes, I see the issue every time
> (i.e. I can never boot)
>
> I tried your patch, and it worked ! Good catch !
>
> Tried it with ubi.fm_autoconvert=0, every thing works fine.
>
> With ubi.fm_autoconvert=1, I see this at the 1st boot (It boots fine):
> [ 0.812500] UBI: default fastmap pool size: 95
> [ 0.820312] UBI: default fastmap WL pool size: 25
> [ 0.820312] UBI: attaching mtd2 to ubi0
> [ 1.273437] UBI: scanning is finished
> [ 1.296875] UBI: attached mtd2 (name "UBI", size 245 MiB) to ubi0
> [ 1.304687] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
> [ 1.304687] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
> [ 1.312500] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
> [ 1.320312] UBI: good PEBs: 1964, bad PEBs: 0, corrupted PEBs: 0
> [ 1.328125] UBI: user volume: 3, internal volumes: 1, max. volumes count: 128
> [ 1.328125] UBI: max/mean erase counter: 0/0, WL threshold: 4096,
> image sequence number: 1933127782
> [ 1.335937] UBI: available PEBs: 306, total reserved PEBs: 1658,
> PEBs reserved for bad PEB handling: 40
> [ 1.343750] UBI: background thread "ubi_bgt0d" started, PID 352
> [ 1.421875] UBI error: ubi_update_fastmap: could not find any anchor PEB
> [ 1.429687] UBI warning: ubi_update_fastmap: Unable to write new
> fastmap, err=-28
The problem here is that the ubinized image uses all 64 anchor PEBs (0 to 63) for data
and fastmap has to move data first to get a free anchor PEBs.
Maybe I find a way to perform this task faster/better.
But IMHO the best thing is adding fastmap support to ubinize.
Thanks,
//richard
prev parent reply other threads:[~2013-08-26 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACQ1gAgOS5kpykb1jxnRJUNCmdC1jwmmWr5cQ7aazKVvMjBPWQ@mail.gmail.com>
2013-08-23 13:55 ` Fastmap and Atmel sam-ba Richard Genoud
2013-08-23 14:17 ` Richard Genoud
2013-08-23 16:54 ` Richard Weinberger
2013-08-23 18:59 ` Richard Weinberger
2013-08-26 9:31 ` Richard Genoud
2013-08-26 14:44 ` Richard Weinberger [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=521B69BB.6000808@nod.at \
--to=richard@nod.at \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.genoud@gmail.com \
/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