[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ed5b778-24f6-25c2-7689-113bb0297847@huaweicloud.com>
Date: Sun, 14 May 2023 19:08:03 +0800
From: Li Nan <linan666@...weicloud.com>
To: Yu Kuai <yukuai1@...weicloud.com>, Song Liu <song@...nel.org>
Cc: linan666@...weicloud.com, neilb@...e.de, Rob.Becker@...erbed.com,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, houtao1@...wei.com, yangerkun@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2 3/4] md/raid10: fix wrong setting of
max_corr_read_errors
在 2023/5/13 10:21, Yu Kuai 写道:
> Hi,
>
> 在 2023/05/13 9:08, Song Liu 写道:
>> On Fri, May 5, 2023 at 7:02 PM Yu Kuai <yukuai1@...weicloud.com> wrote:
>>>
>>> Hi,
>>>
>>> 在 2023/05/06 9:23, linan666@...weicloud.com 写道:
>>>> From: Li Nan <linan122@...wei.com>
>>>>
>>>> max_corr_read_errors should not be negative number. Change it to
>>>> unsigned int where use it.
>>>>
>>>
>>> Looks good, feel free to add:
>>>
>>> Reviewed-by: Yu Kuai <yukuai3@...wei.com>
>>>
>>>> Fixes: 1e50915fe0bb ("raid: improve MD/raid10 handling of
>>>> correctable read errors.")
>>>> Signed-off-by: Li Nan <linan122@...wei.com>
>>
>> Hmm.. Does the current code break in any cases?
>
> The problem is that somewhere use unsigned value, and somewhere use
> signed value, and I thinsk the only functional change is in
> fix_read_error(), if max_read_errors is negative, the judgement will
> always pass before this patch:
>
> if (atomic_read(&rdev->read_errors) > max_read_errors)
>
In addition, it is confusing for users after setting a huge number to it.
# echo 4294967295 > /sys/block/$disk/md/max_read_errors
# cat /sys/block/$disk/md/max_read_errors
-1
--
Thanks,
Nan
Powered by blists - more mailing lists