From: "Chen Cheng" <chencheng@fnnas.com>
To: <yukuai@fygo.io>, <linux-raid@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/3] md/raid10: bound reused r10bio devs[] walks by used_nr_devs
Date: Mon, 22 Jun 2026 19:13:54 +0800 [thread overview]
Message-ID: <6b3bc982-e895-4672-9161-468a10591ebd@fnnas.com> (raw)
In-Reply-To: <a2f3a5da-71c3-4cff-ba97-db39e3ec4964@fygo.io>
在 2026/6/22 15:53, yu kuai 写道:
> Hi,
>
> 在 2026/6/22 14:34, Chen Cheng 写道:
>> The true dangerous is in-flight r10bio which use old geometry.
>
> You didn't explain why there can be inflight r10bio when array is suspended,
> if this can happen, this is the root cause need to be fixed.
>
one scenario is .
CPU A (softirq, raid_end_bio_io) CPU B (action_store)
================================ ===============================
bio_endio(master_bio)
md_end_clone_io
percpu_ref_put → 0
wait_event wakeup,
mddev_suspend return
raid10_start_reshape:
setup_geo(&conf->geo, new)
...
mempool_destroy(old_pool)
conf->r10bio_pool = new_pool
allow_barrier(conf)
free_r10bio(r10_bio)
put_all_bios:
for (i=0; i<conf->geo.raid_disks; i++)
==> old obj, new geo, OOB
mempool_free(r10_bio, conf->r10bio_pool)
==> old geo obj free into new pool
The fix, as your advise , raid_end_bio_io:
1. put_all_bios, mempool_free
2. bio_endio if returned
3. allow_barrier
would be replace with patch 03.
prev parent reply other threads:[~2026-06-22 11:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 3:59 [PATCH v4 0/3] md/raid10: fix r10bio width mismatches across reshape Chen Cheng
2026-06-03 3:59 ` [PATCH v4 1/3] md: suspend array before raid10 reshape via sync_action Chen Cheng
2026-06-20 19:43 ` yu kuai
2026-06-03 3:59 ` [PATCH v4 2/3] md/raid10: make r10bio_pool use fixed-size objects Chen Cheng
2026-06-20 20:05 ` yu kuai
2026-06-03 3:59 ` [PATCH v4 3/3] md/raid10: bound reused r10bio devs[] walks by used_nr_devs Chen Cheng
2026-06-20 20:02 ` yu kuai
2026-06-22 6:34 ` Chen Cheng
2026-06-22 7:53 ` yu kuai
2026-06-22 11:13 ` Chen Cheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b3bc982-e895-4672-9161-468a10591ebd@fnnas.com \
--to=chencheng@fnnas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=yukuai@fygo.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox