linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] UBI: improve empty flash handling
@ 2010-05-03 10:12 Artem Bityutskiy
  2010-05-03 10:12 ` [PATCH 1/4] UBI: simplify IO error codes - part 1 Artem Bityutskiy
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Artem Bityutskiy @ 2010-05-03 10:12 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: linux-mtd

Hi Sebastian,

I've removed your 'UBI: recognize empty flash with errors as empty'
patch from the ubi-2.6.git tree, because it solves one problem, but
introduces another, and needs more work, as you yourself pointed.

This is a series of patches which is intended to fix your problem.
Basically, the idea is that during scanning, we just remember the
information about which eraseblocks we found. Then at the end, we
look at them and decide what to do.

We do the following:

1. If there are more than 8 corrupted eraseblocks, we print a warning.
   This functionality was there before. This is just a warning, nothing
   else.
2. If more than 5% or eraseblocks are corrupted, we refuse. This logic
   was not there, I've just added it.
3. If now UBI-formatted eraseblocks were found, then we start checking
   whether this is empty device and we should format it. Otherwise, we
   go forward and try to attach the device.

   3.1 If there are not corrupted eraseblocks -> empty, format
   3.2 If there are few corrupted eraseblocks, all of them had read error
       -> empty, format. This is the place where we handle the "empty
       flash with few bad eraseblocks not marked yet as such"
   3.3 If there is a corrupted eraseblock, and there was not read error,
       or if there are many corrupted eraseblocks (>= 8), then we refuse.

Please, review and test the following series.

P.S. I gave it only a very quick try

Artem.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-05-23 12:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 10:12 [PATCH 0/4] UBI: improve empty flash handling Artem Bityutskiy
2010-05-03 10:12 ` [PATCH 1/4] UBI: simplify IO error codes - part 1 Artem Bityutskiy
2010-05-03 10:13 ` [PATCH 2/4] UBI: introduce a new IO return code Artem Bityutskiy
2010-05-06  9:34   ` Sebastian Andrzej Siewior
2010-05-07  5:37     ` Artem Bityutskiy
2010-05-03 10:13 ` [PATCH 3/4] UBI: introduce eraseblock counter variables Artem Bityutskiy
2010-05-03 10:13 ` [PATCH 4/4] UBI: improve corrupted flash handling Artem Bityutskiy
2010-05-06  9:52 ` [PATCH 0/4] UBI: improve empty " Sebastian Andrzej Siewior
2010-05-07  5:39   ` Artem Bityutskiy
2010-05-23 12:03     ` Artem Bityutskiy
2010-05-07  5:57   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).