]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: fix corruption dump
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 29 Jun 2009 16:27:14 +0000 (19:27 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 9 Jul 2009 06:19:39 +0000 (09:19 +0300)
commitd4cae8af97eea6a4eab90deb58ca07bf004b428f
tree5acf6d6bc38cfd96c3d0ba4dc101d7e6a2606d16
parent501665183725fef4b53ca2e2502067bf89a6e9d2
UBIFS: fix corruption dump

In the 'ubifs_recover_leb()' function, when we find corrupted
empty space, we dump 8K starting from the offset where the last
node ends. This is OK if the corrupted empty space is somewhere
near that offset. But if the corruption is far at the end of the
LEB, we will dump all 0xFF bytes and complitely ignore the
interesting data. This is observed on a PPC ("kilauea") with
NOR flash.

This patch changes the behavior and teaches UBIFS to print only
interesting data. I.e., now we find where corruption starts and
start dumping from that offset.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
fs/ubifs/recovery.c