diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-05-20 06:54:02 (GMT) |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-24 10:32:54 (GMT) |
commit | beeea636030622f6de67d15c61f5b311a03d188c (patch) | |
tree | 217f6ae5a148a1ef7054aad42ce5664f74c763b2 /drivers | |
parent | 979c9296bdcfded58ebac41905c3397317df0355 (diff) | |
download | linux-beeea636030622f6de67d15c61f5b311a03d188c.tar.xz |
UBI: add a comment
It is not clear why we schedule PEB for scrubbing in case of
-EBADMSG. Elaborate.
Requested-by: Kyungmin Park <kmpark@infradead.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 3c4d68f..42a7815 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -385,7 +385,16 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0, ubi->vtbl_size); if (err == UBI_IO_BITFLIPS || err == -EBADMSG) - /* Scrub the PEB later */ + /* + * Scrub the PEB later. Note, -EBADMSG indicates an + * uncorrectable ECC error, but we have our own CRC and + * the data will be checked later. If the data is OK, + * the PEB will be scrubbed (because we set + * seb->scrub). If the data is not OK, the contents of + * the PEB will be recovered from the second copy, and + * seb->scrub will be cleared in + * 'ubi_scan_add_used()'. + */ seb->scrub = 1; else if (err) goto out_free; |