[PATCH 0/3] md/raid0: fix a takeover BUG and tidy member-size rounding
From: Zizhi Wo
Date: Fri Oct 16 2026 - 21:05:43 EST
From: Zizhi Wo <wozizhi@xxxxxxxxxx>
Patch 1 fixes a syzbot BUG() in find_zone(): a takeover can build strip
zones that cover less than the array still advertises, and I/O for the tail
reaches find_zone(), which cannot map it. Reject such a takeover up front.
Patch 2 factors out the "member size rounded down to a chunk" computation.
Patch 3 uses it in raid0_size() in place of a power-of-2 mask, which is not
a round down for a non-power-of-2 chunk, to consistent with how
create_strip_zones() already rounds the members when building the zones.
Zizhi Wo (3):
md/raid0: reject a takeover whose zones cannot cover the array
md/raid0: factor out raid0_member_sectors()
md/raid0: round member size in raid0_size() with sector_div()
drivers/md/raid0.c | 48 +++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 5 deletions(-)
--
2.52.0