Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] md/raid0: fix a takeover BUG and tidy member-size rounding
@ 2026-10-17  0:57 Zizhi Wo
  2026-10-17  0:58 ` [PATCH 1/3] md/raid0: reject a takeover whose zones cannot cover the array Zizhi Wo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zizhi Wo @ 2026-10-17  0:57 UTC (permalink / raw)
  To: song, yukuai, magiclinan, xiao, linux-raid
  Cc: linux-kernel, yangerkun, chengzhihao1, wozizhi

From: Zizhi Wo <wozizhi@huawei.com>

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-17  3:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-17  0:57 [PATCH 0/3] md/raid0: fix a takeover BUG and tidy member-size rounding Zizhi Wo
2026-10-17  0:58 ` [PATCH 1/3] md/raid0: reject a takeover whose zones cannot cover the array Zizhi Wo
2026-10-17  1:26   ` sashiko-bot
2026-10-17  3:27     ` Zizhi Wo
2026-10-17  0:58 ` [PATCH 2/3] md/raid0: factor out raid0_member_sectors() Zizhi Wo
2026-10-17  0:58 ` [PATCH 3/3] md/raid0: round member size in raid0_size() with sector_div() Zizhi Wo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox