• Artem Bityutskiy's avatar
    UBI: print a warning if too many PEBs are corrupted · 4a406856
    Artem Bityutskiy authored
    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: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
    4a406856
scan.c 34.4 KB