Question about the 2-bit EDC scrubbing at UBI
Kyungmin Park
kmpark at infradead.org
Mon May 19 21:49:24 EDT 2008
Hi,
In internal layout handling in UBI, it plans to scrub the LEB if the
2-bit EDC is found.
As you know, if the EDC is detected it can't trust which bit is wrong.
So it needs another handling.
But the code does as 1-bit ECC.
How do you think? Is that make a problem in use?
static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
struct ubi_scan_info *si,
struct ubi_scan_volume *sv)
{
...snip...
dbg_msg("check layout volume");
/* Read both LEB 0 and LEB 1 into memory */
ubi_rb_for_each_entry(rb, seb, &sv->root, u.rb) {
leb[seb->lnum] = vmalloc(ubi->vtbl_size);
if (!leb[seb->lnum]) {
err = -ENOMEM;
goto out_free;
}
memset(leb[seb->lnum], 0, ubi->vtbl_size);
err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0,
ubi->vtbl_size);
/* It has to check only 1-bit ECC not 2-bit EDC */
if (err == UBI_IO_BITFLIPS || err == -EBADMSG) =>
should be 'if (err == UBI_IO_BITFLIPS)'
/* Scrub the PEB later */
seb->scrub = 1;
else if (err)
goto out_free;
}
...snip...
}
Thank you,
Kyungmin Park
More information about the linux-mtd
mailing list