From: Miquel Raynal <miquel.raynal@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Thomas Gleixner <tglx@kernel.org>,
"Artem B. Bityuckiy" <dedekind@infradead.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: rawnand: stop BBT creation when the marker scan fails
Date: Wed, 18 Nov 2026 10:45:51 +0100 [thread overview]
Message-ID: <87fqwyjwvk.fsf@bootlin.com> (raw)
In-Reply-To: <20261103-submit-rawnand-bbt-scan-error-v1-v1-1-0bef8334198c@gmail.com> (James Hilliard's message of "Tue, 03 Nov 2026 22:52:39 -0700")
On 03/11/2026 at 22:52:39 -07, James Hilliard <james.hilliard1@gmail.com> wrote:
> create_bbt() returns an error if reading a bad-block marker fails,
This sentence does not mean anything.
> but
> check_create() ignores that result. It can assign version 1 to the
That's also unclear.
> incomplete RAM table and write it to the primary and mirror locations.
> Unscanned factory-bad blocks then appear good in the persisted tables.
Here is a proposal which I believe makes more sense:
mtd: rawnand: abort BBT creation on scan failure
create_bbt() can fail on a non-ECC OOB read error, leaving the RAM BBT
partially populated. It is preferable to bail out early rather than bump
the table versions and write incomplete primary and mirror tables, which
would mark the unscanned factory-bad blocks as good.
> Propagate the scan failure before changing table versions or writing
> either copy. Keep explicit NAND_BBT_CREATE_EMPTY initialization unchanged.
>
> Fixes: eeada24da8bd ("[MTD] NAND: Read only OOB bytes during bad block scan")
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
I would prefer if you could write your own commit logs, giving us more
confidence on the work that has been asked. You can use an LLM to
improve/enhance it obviously.
Thanks,
Miquèl
prev parent reply other threads:[~2026-11-18 9:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 5:52 [PATCH] mtd: rawnand: stop BBT creation when the marker scan fails James Hilliard
2026-11-18 9:45 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fqwyjwvk.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=dedekind@infradead.org \
--cc=james.hilliard1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tglx@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox