[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e352650c-93b7-4f0e-ae40-3988644da39d@huaweicloud.com>
Date: Tue, 25 Feb 2025 17:14:56 +0800
From: Li Nan <linan666@...weicloud.com>
To: Zhu Yanjun <yanjun.zhu@...ux.dev>,
Zheng Qixing <zhengqixing@...weicloud.com>, axboe@...nel.dk,
song@...nel.org, colyli@...nel.org, yukuai3@...wei.com,
dan.j.williams@...el.com, vishal.l.verma@...el.com, dave.jiang@...el.com,
ira.weiny@...el.com, dlemoal@...nel.org, kch@...dia.com, hare@...e.de,
zhengqixing@...wei.com, john.g.garry@...cle.com, geliang@...nel.org,
xni@...hat.com, colyli@...e.de
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, nvdimm@...ts.linux.dev, yi.zhang@...wei.com,
yangerkun@...wei.com
Subject: Re: [PATCH 06/12] badblocks: fix the using of MAX_BADBLOCKS
在 2025/2/21 18:09, Zhu Yanjun 写道:
>
> On 21.02.25 09:11, Zheng Qixing wrote:
>> From: Li Nan <linan122@...wei.com>
>>
>> The number of badblocks cannot exceed MAX_BADBLOCKS, but it should be
>> allowed to equal MAX_BADBLOCKS.
>>
>> Fixes: aa511ff8218b ("badblocks: switch to the improved badblock handling
>> code")
>> Signed-off-by: Li Nan <linan122@...wei.com>
>> ---
>> block/badblocks.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/block/badblocks.c b/block/badblocks.c
>> index a953d2e9417f..87267bae6836 100644
>> --- a/block/badblocks.c
>> +++ b/block/badblocks.c
>> @@ -700,7 +700,7 @@ static bool can_front_overwrite(struct badblocks *bb,
>> int prev,
>> *extra = 2;
>> }
>> - if ((bb->count + (*extra)) >= MAX_BADBLOCKS)
>> + if ((bb->count + (*extra)) > MAX_BADBLOCKS)
>> return false;
>
>
> In this commit,
>
> commit c3c6a86e9efc5da5964260c322fe07feca6df782
> Author: Coly Li <colyli@...e.de>
> Date: Sat Aug 12 01:05:08 2023 +0800
>
> badblocks: add helper routines for badblock ranges handling
>
> This patch adds several helper routines to improve badblock ranges
> handling. These helper routines will be used later in the improved
> version of badblocks_set()/badblocks_clear()/badblocks_check().
>
> - Helpers prev_by_hint() and prev_badblocks() are used to find the bad
> range from bad table which the searching range starts at or after.
>
> The above is changed to MAX_BADBLOCKS. Thus, perhaps, the Fixes tag should
> include the above commit?
>
> Except that, I am fine with this commit.
>
> Reviewed-by: Zhu Yanjun <yanjun.zhu@...ux.dev>
>
> Zhu Yanjun
>
Thank! I will bring this fix tag in v2.
--
Thanks,
Nan
Powered by blists - more mailing lists