[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zfbdmcsd.fsf@bootlin.com>
Date: Tue, 02 Sep 2025 11:20:02 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Wang Zhaolong <wangzhaolong@...weicloud.com>
Cc: richard@....at, vigneshr@...com, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org, chengzhihao1@...wei.com,
yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH] mtd: core: only increment ecc_stats.badblocks on
confirmed good->bad transition
Hello,
>> Said otherwise, the { while () badblocks++ } block shall remain outside
>> of the if (_block_isbad) condition and remain untouched. Just bail out
>> early if you are sure this is not needed.
>>
>
> I’ll send a V2 shortly that:
>
> - Checks old state when _block_isbad exists and bails out early if already bad
> - Otherwise calls ->_block_markbad() and increments the counter on success, with
> the increment left outside of the conditional as you suggested
LGTM.
Thanks,
Miquèl
Powered by blists - more mailing lists