Skip to content

Commit

Permalink
UBI: fix forward compatibility
Browse files Browse the repository at this point in the history
Commit 0798cea "UBI: improve corrupted flash handling"
broke delet-compatible volumes handling - it introduced a limit of 8 eraseblocks which
may be corrupted. And delete-compatible eraseblocks are added to the "corrupted" list,
so if we'd have a large delete-compatible volume, UBI would refuse it.

The fix is to add delete-compatible volumes to the erase list instead. Indeed, they are
corrupted, we just have to erase them.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 30, 2010
1 parent 01ebc12 commit 80c1c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
case UBI_COMPAT_DELETE:
ubi_msg("\"delete\" compatible internal volume %d:%d"
" found, will remove it", vol_id, lnum);
err = add_to_list(si, pnum, ec, &si->corr);
err = add_to_list(si, pnum, ec, &si->erase);
if (err)
return err;
return 0;
Expand Down

0 comments on commit 80c1c16

Please sign in to comment.