Skip to content

Commit

Permalink
UBI: print a message if ECH is corrupted and VIDH is ok
Browse files Browse the repository at this point in the history
If the EC header is corrupted, but the VID header is OK, UBI accepts the
PEB and treats it as "used". However, generally this should not happen.
Print a warning if this happens.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 14, 2009
1 parent 64f1607 commit 29a88c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,9 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
}
}

/* Both UBI headers seem to be fine */
if (ec_corr)
ubi_warn("valid VID header but corrupted EC header at PEB %d",
pnum);
err = ubi_scan_add_used(ubi, si, pnum, ec, vidh, bitflips);
if (err)
return err;
Expand Down

0 comments on commit 29a88c9

Please sign in to comment.