* "warning!: only 995 of 1984 eraseblocks have valid erase counter"
@ 2011-06-19 10:37 Gilles
2011-06-23 9:14 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Gilles @ 2011-06-19 10:37 UTC (permalink / raw)
To: linux-mtd
Hello
After "make" built rootfs.ubifs, I ran ubinize before uploading the
file to a web server.
I then downloaded that file on a uClinux appliance, and ran the
following command to format /dev/mtd2 with the image:
=========
ubiformat /dev/mtd2 -s 512 -f rootfs.ubi.img
=========
This command triggers the following warning:
=========
...
libscan: scanning eraseblock 1982 -- 99 % complete MTD_ioctl
MTD_read
libscan: scanning eraseblock 1983 -- 100 % complete MTD_ioctl
MTD_read
ubiformat: 995 eraseblocks have valid erase counter, mean value is 14
ubiformat: 989 eraseblocks are supposedly empty
ubiformat: warning!: only 995 of 1984 eraseblocks have valid erase
counter
ubiformat: mean erase counter 14 will be used for the rest of
eraseblock
ubiformat: continue? (yes/no)
=========
Running just "ubiformat /dev/mtd2 -s 512" triggers the same warning.
I don't know what the warning really means, and what the consequences
are when answering "yes". Could someone tell me?
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "warning!: only 995 of 1984 eraseblocks have valid erase counter"
2011-06-19 10:37 "warning!: only 995 of 1984 eraseblocks have valid erase counter" Gilles
@ 2011-06-23 9:14 ` Artem Bityutskiy
2011-06-23 9:19 ` Gilles
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2011-06-23 9:14 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Sun, 2011-06-19 at 12:37 +0200, Gilles wrote:
> Hello
>
> After "make" built rootfs.ubifs, I ran ubinize before uploading the
> file to a web server.
>
> I then downloaded that file on a uClinux appliance, and ran the
> following command to format /dev/mtd2 with the image:
> =========
> ubiformat /dev/mtd2 -s 512 -f rootfs.ubi.img
> =========
>
> This command triggers the following warning:
> =========
> ...
> libscan: scanning eraseblock 1982 -- 99 % complete MTD_ioctl
> MTD_read
> libscan: scanning eraseblock 1983 -- 100 % complete MTD_ioctl
> MTD_read
>
> ubiformat: 995 eraseblocks have valid erase counter, mean value is 14
> ubiformat: 989 eraseblocks are supposedly empty
> ubiformat: warning!: only 995 of 1984 eraseblocks have valid erase
> counter
> ubiformat: mean erase counter 14 will be used for the rest of
> eraseblock
> ubiformat: continue? (yes/no)
> =========
>
> Running just "ubiformat /dev/mtd2 -s 512" triggers the same warning.
>
> I don't know what the warning really means, and what the consequences
> are when answering "yes". Could someone tell me?
I think it is self-explanatory. Please, ask specific question. WRT to
consequences - it should not be critical.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "warning!: only 995 of 1984 eraseblocks have valid erase counter"
2011-06-23 9:14 ` Artem Bityutskiy
@ 2011-06-23 9:19 ` Gilles
2011-06-23 14:30 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Gilles @ 2011-06-23 9:19 UTC (permalink / raw)
To: linux-mtd
On Thu, 23 Jun 2011 12:14:01 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>I think it is self-explanatory. Please, ask specific question. WRT to
>consequences - it should not be critical.
I went ahead, answered yes, and it seems to work OK, but I was curious
to understand what the message really means.
Before reflashing memory with an image, does ubiformat always warn the
user that the empty blocks after the image will have their erase
counter set to the average computed from the used blocks, regardless
of their actual usage so far?
It's just for my education. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "warning!: only 995 of 1984 eraseblocks have valid erase counter"
2011-06-23 9:19 ` Gilles
@ 2011-06-23 14:30 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-06-23 14:30 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Thu, 2011-06-23 at 11:19 +0200, Gilles wrote:
> On Thu, 23 Jun 2011 12:14:01 +0300, Artem Bityutskiy
> <dedekind1@gmail.com> wrote:
> >I think it is self-explanatory. Please, ask specific question. WRT to
> >consequences - it should not be critical.
>
> I went ahead, answered yes, and it seems to work OK, but I was curious
> to understand what the message really means.
What exactly is unclear in the messages? :-)
> Before reflashing memory with an image, does ubiformat always warn the
> user that the empty blocks after the image will have their erase
> counter set to the average computed from the used blocks, regardless
> of their actual usage so far?
Yes. If you properly use tools - you should never see the warnings. Most
probably you flash images using UBI-unaware tools, or you erase the
flash using UBI-unaware tools like flash_erase or do it in u-boot.
But I agree that ubiformat could probably be smarter and avoid printing
this warning if half of the flash is UBI-formatted and the other half is
empty.
Current logic is - if not everything is UBI-formatted - warn. But it
could be - if not everything is UBI-formatted and the eraseblocks are
not empty - warn. Feel free to send a patch :-)
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-23 14:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-19 10:37 "warning!: only 995 of 1984 eraseblocks have valid erase counter" Gilles
2011-06-23 9:14 ` Artem Bityutskiy
2011-06-23 9:19 ` Gilles
2011-06-23 14:30 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox