UBIFS Corrupt during power failure
Artem Bityutskiy
dedekind at infradead.org
Fri Jul 3 10:58:51 EDT 2009
On Fri, 2009-07-03 at 08:47 -0600, Urs Muff wrote:
> I can't find the data-sheet reference to that, but I would not characterize it as 'erasing from the end'.
>
> As far as I understand it is a 2 phase process, and you can lose power at any point so you can see a partial phase I or a partial phase II state.
> - phase I: set all data to 00: a partial picture would be to see 00 at the beginning and random at the end of the block
> - phase II: set all data to FF: a partial picture would be to see FF at the beginning and 00 at the end of the block
That would be nice, because then UBI would work fine, since it would
notice corrupted EC header at the beginning, and would drop the PEB.
> From looking at your dumps, it appears that you got interrupted during
> phase II. I'm not sure why you still have the header, but that might
> be b/c the block has been reclaimed / reinitialized (I'm not familiar
> with the actual code, but it appears that way from the dump).
No, I believe it was not reinitialized.
But I should write a small test program which writes a known pattern to
PEBs, then erases them, and sees what happened to them after an unclean
reboot.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list