Re: [PATCH v2 3/3] md/raid10: skip clean regions in bulk during recovery

Yunye Zhao <[email protected]>
Newsgroups org.kernel.vger.linux-raid,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Kuai,

On 2026/8/7, Yu Kuai wrote:
>> If I read you right, you would prefer this fixed on the bitmap side
>> rather than in raid10.c.
>
> I still don't get why

Sorry, I misread your earlier reply.  I had read it as "the whole thing
belongs in md-bitmap.c", i.e. that bitmap_start_sync() should hand back a
device-space span, which is why I said md-bitmap.c would need the raid10
geometry.  That is not what you were saying.

I think the split is this: the first half belongs in md, in array address
space - bitmap_start_sync() should report a much larger clean span,
ideally up to the full array size - and the second half, the array ->
member conversion and the minimum over the members, is what 3/3 already
does.

> Check the code, currently raid10 do not map the max_sync, which is RESYNC_PAGES, back
> to rdev sector, and use it directly. I wonder is this safe for raid10 with chunksize less
> than RESYNC_PAGES?

Good point, v2 does not address that.  Let me think it through properly
and handle it in the next version.

Thanks,
Yunye
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.