Re: [PATCH] mtd: rawnand: propagate BBT read transport errors
From: Miquel Raynal
Date: Wed Nov 18 2026 - 05:00:04 EST
On 03/11/2026 at 23:03:39 -07, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> check_create() handles uncorrectable ECC errors by invalidating the
> affected BBT copy and handles corrected errors by scheduling a rewrite.
> Other read_abs_bbt() failures are ignored, allowing initialization to
> succeed with missing entries in the RAM table or to rewrite a table that
> was not completely read.
>
> Return non-ECC read errors from both the selected table and the second
> unversioned copy before updating versions or writing tables. A transport
> failure does not establish that the selected table is corrupt or that an
> older mirror contains all of its bad-block information. Preserve the
> existing ECC-specific recovery paths.
Be honest, you did not read that back. I don't think one would guess the
big picture by reading this. Here is a proposal:
```
ECC failures have dedicated recovery paths: -EBADMSG invalidates the
affected copy and -EUCLEAN schedules a scrub. Any other read error
(typically an I/O error) would be unhandled and leave the RAM table
incomplete.
Make sure those errors are propagated.
```
Thanks,
Miquèl