]> bbs.cooldavid.org Git - net-next-2.6.git/commit
UBI: print a warning if too many PEBs are corrupted
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 19 Jul 2009 11:33:14 +0000 (14:33 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 14 Aug 2009 17:01:36 +0000 (20:01 +0300)
commit4a406856ea6830d8b8dba6a27d9f9331c5f4c13a
tree9bca90ac072a68eb762f985d62c512c55ba6dadc
parent5b289b562f6d236108569a880cb38cc03d17a50d
UBI: print a warning if too many PEBs are corrupted

There was a bug report recently where UBI prints:

UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22

error messages and refuses to attach a PEB. It turned out to be a
buggy flash driver which returned garbage to almost every UBI read.
This patch makes UBI print a better message in such cases. Namely,
if UBI finds 8 or more corrupted PEBs, it prints a warning and
lists the corrupted PEBs.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/scan.h