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: Ubiformat --erase-counter not always used
Date: Tue, 24 Nov 2009 08:57:11 +0200 [thread overview]
Message-ID: <1259045831.18407.54.camel@localhost> (raw)
In-Reply-To: <B125D8217ABC4B43826503DE00A2D44910DF852EF3@SJEXCHCCR01.corp.ad.broadcom.com>
On Mon, 2009-11-23 at 10:57 -0800, Darwin Rambo wrote:
> Hello Artem,
>
> This is not a bug report, just an observation on ubiformat. It only seems to take the --erase-counter parameter in certain situations. If you have alien data it seems to take it. If the blocks are FF erased or previously formatted correctly it seems to ignore the --erase-counter argument, even though it says it is using it (see below).
>
> Should we add something in the online help or documentation to explain this better and maybe say in the ubiformat tool itself when the switch is getting used or ignored and why?
>
> # ./ubiformat /dev/mtd4 -n --erase-counter=1234 -v -y
> ubiformat: mtd4 (NAND), size 2097152 bytes (2.0 MiB), 524288 eraseblocks of 524288 bytes (512.0 KiB), min. I/O size 4096 bytes
> libscan: start scanning eraseblocks 0-4
> libscan: scanning eraseblock 0: alien
> libscan: scanning eraseblock 1: alien
> libscan: scanning eraseblock 2: alien
> libscan: scanning eraseblock 3: alien
> libscan: finished, mean EC 0, 0 OK, 0 corrupted, 0 empty, 4 alien, bad 0
> ubiformat: warning!: 4 of 4 eraseblocks contain non-ubifs data
> ubiformat: use erase counter 1234 for all eraseblocks
> ubiformat: eraseblock 0: erase, write EC 1234
> ubiformat: eraseblock 1: erase, write EC 1234
> ubiformat: eraseblock 2: erase, write EC 1234
> ubiformat: eraseblock 3: erase, write EC 1234
> 192.168.1.105 # ./ubiformat /dev/mtd4 -n --erase-counter=5432 -v -y
> ubiformat: mtd4 (NAND), size 2097152 bytes (2.0 MiB), 524288 eraseblocks of 524288 bytes (512.0 KiB), min. I/O size 4096 bytes
> libscan: start scanning eraseblocks 0-4
> libscan: scanning eraseblock 0: OK, erase counter 1234
> libscan: scanning eraseblock 1: OK, erase counter 1234
> libscan: scanning eraseblock 2: OK, erase counter 1234
> libscan: scanning eraseblock 3: OK, erase counter 1234
> libscan: finished, mean EC 1234, 4 OK, 0 corrupted, 0 empty, 0 alien, bad 0
> ubiformat: 4 eraseblocks have valid erase counter, mean value is 1234
> ubiformat: use erase counter 5432 for all eraseblocks <------------------ Didn't take this value
> ubiformat: eraseblock 0: erase, write EC 1235
> ubiformat: eraseblock 1: erase, write EC 1235
> ubiformat: eraseblock 2: erase, write EC 1235
> ubiformat: eraseblock 3: erase, write EC 1235
Looks like a bug to me. I think it should take the EC you ask it in all
cases. I'll look at this when I have a bit more time, thanks for the
report.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-11-24 6:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 22:45 [patch 4/4] mtd/nand: fix multi-chip suspend problem akpm
2009-11-23 15:19 ` Artem Bityutskiy
2009-11-23 18:57 ` Ubiformat --erase-counter not always used Darwin Rambo
2009-11-24 6:57 ` Artem Bityutskiy [this message]
2009-11-26 9:41 ` Artem Bityutskiy
2009-11-23 20:24 ` [patch 4/4] mtd/nand: fix multi-chip suspend problem Andrew Morton
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=1259045831.18407.54.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