Re: Is there possible to integrate mtd ubi ubifs latest version in one git tree?

Artem Bityutskiy
2008-04-15T11:48:54Z

On Tue, 2008-04-15 at 12:41 +0100, Jamie Lokier wrote:
> If erase counters are stored at the start of each block, for the block
> itself, what happens in this sequence?
>
> 1. Begin erase block.
> 2. Erase succeeds.
> 3. Power failure / system reset / watchdog / etc.
> 4. ....?
>
> Is the erase counter zeroed as a result of this?

It tries to minimize probability of situations like this by writing the
EC right after the erasure. But this still can happen of course. In this
case UBI uses the average erase-counter (calculated while scanning is
done) and writes it to this eraseblock.