md: factor out a helper exceed_read_errors() to check read_errors
authorLi Nan <linan122@huawei.com>
Fri, 15 Dec 2023 02:38:51 +0000 (10:38 +0800)
committerSong Liu <song@kernel.org>
Fri, 15 Dec 2023 23:22:15 +0000 (15:22 -0800)
commit1979dbbe328ca4e1d0f061c94381cfa03388088d
tree57a87fab3d75f2a65e7d211ba644b47aa6109ade
parentdc1cc22ed58f11d58d8553c5ec5f11cbfc3e3039
md: factor out a helper exceed_read_errors() to check read_errors

Move check_decay_read_errors() to raid1-10.c and factor out a helper
exceed_read_errors() to check if read_errors exceeds the limit, so that
raid1 can also use it. There are no functional changes.

Signed-off-by: Li Nan <linan122@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231215023852.3478228-2-linan666@huaweicloud.com
drivers/md/raid1-10.c
drivers/md/raid1.c
drivers/md/raid10.c