All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about scrubbing and ECC errors (in UBI)
@ 2023-07-21  1:55 David Gideon
  0 siblings, 0 replies; only message in thread
From: David Gideon @ 2023-07-21  1:55 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have a general question about how ECC errors are handled in
drivers/mtd/ubi/eba.c.  I am using a Micron raw NAND part with on-die
ECC and an ECC strength of 4 bits.

I simulated an ECC error via some error injection code, to see whether
or not the UBI layer would mark it for scrubbing.  But I saw that UBI
didn't want to mark it for scrubbing, due to it being a UBI dynamic
volume.  Here's the relevant code (which seems to have been around
since 2006, and still exists on 6.x-series kernels).

I'm just wondering; what is the motivation/reasoning behind only
setting 'scrub = 1' (and scrubbing) if it is _not_ a dynamic volume?
Why only scrub if it's a static volume?  I would have thought that
scrubbing a PEB would be beneficial in all cases that an ECC error
occurred.

err = ubi_io_read_data(ubi, buf, pnum, offset, len);
if (err) {
    if (err == UBI_IO_BITFLIPS)
        scrub = 1;
    else if (mtd_is_eccerr(err)) {
        if (vol->vol_type == UBI_DYNAMIC_VOLUME)
            goto out_unlock;
        scrub = 1;
        if (!check) {
            ubi_msg(ubi, "force data checking");
            check = 1;
            goto retry;
        }
    } else
        goto out_unlock;
}

Thanks!
- DG

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-21  2:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21  1:55 Question about scrubbing and ECC errors (in UBI) David Gideon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.