From: Yunye Zhao <yunye.zhao@linux.alibaba.com>
To: yukuai@fygo.io
Cc: joseph.qi@linux.alibaba.com, linux-kernel@vger.kernel.org,
linux-raid@vger.kernel.org, magiclinan@didiglobal.com,
song@kernel.org, xiao@kernel.org, yunye.zhao@linux.alibaba.com,
sashiko-bot@kernel.org
Subject: Re: [PATCH v2 3/3] md/raid10: skip clean regions in bulk during recovery
Date: Tue, 4 Aug 2026 11:55:16 +0800 [thread overview]
Message-ID: <20260804035516.98652-1-yunye.zhao@linux.alibaba.com> (raw)
In-Reply-To: <0650db8f-14d2-4f80-949f-82553fd8485b@fygo.io>
Hi Kuai,
On Thu, 31 Jul 2026 at 17:46, Yu Kuai wrote:
> I'm confused, recovery means replace a new disk ... the whole new disk
> have to rebuild ... there is nothing to skip
>
> So are you talking about the case that the array is already broken?
The recovery target here is a *re-added existing member*, not a fresh
spare.
Right, for a fresh spare: saved_raid_disk != slot sets conf->fullsync=1,
this skip is bypassed, and the whole disk rebuilds. This patch does not
touch that.
The case I fix is a member transiently removed and re-added:
- a member drops out; its mirror partner stays online, so the array is
still redundant and readable (not broken);
- nothing is written while it is gone, so the write-intent bitmap
stays clean;
- the same disk is re-added: valid superblock, saved_raid_disk == old
slot, so conf->fullsync stays 0 and md does a bitmap-based recovery
(MD_RECOVERY_RECOVER; /proc/mdstat shows "recovery").
The bitmap is fully clean, every chunk returns must_sync == false,
biolist stays NULL, and we hit the existing "*skipped=1; return
max_sync;" path. Only its step size is wrong.
Reproducer (near=2, 4 disks, nothing written while degraded, each pair
keeps a live copy):
mdadm --create /dev/md0 -l10 -n4 -p n2 --bitmap=internal \
--bitmap-chunk=512M --assume-clean --run <4 x 8T>
mdadm /dev/md0 --fail /dev/loop1 --remove /dev/loop1
mdadm /dev/md0 --fail /dev/loop3 --remove /dev/loop3
# no writes here
mdadm /dev/md0 --re-add /dev/loop1
mdadm /dev/md0 --re-add /dev/loop3
Thanks,
Yunye
next prev parent reply other threads:[~2026-08-04 3:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 6:27 [PATCH] md: fix soft lockup during resync when sync is repeatedly skipped Yunye Zhao
2026-07-17 6:51 ` sashiko-bot
2026-07-19 10:45 ` yu kuai
2026-07-20 6:20 ` Yunye Zhao
2026-07-22 4:00 ` yu kuai
2026-07-23 13:55 ` [PATCH v2 0/3] md/raid10: fix recovery corruption and soft lockup on large arrays Yunye Zhao
2026-07-23 13:55 ` [PATCH v2 1/3] md/raid10: fix still_degraded being inverted in raid10_sync_request() Yunye Zhao
2026-07-26 12:25 ` Mykola Marzhan
2026-07-27 2:43 ` Yunye Zhao
2026-08-07 8:11 ` yu kuai
2026-07-23 13:55 ` [PATCH v2 2/3] md: add cond_resched() to md_do_sync()'s skip path Yunye Zhao
2026-07-23 14:05 ` sashiko-bot
2026-08-07 8:11 ` yu kuai
2026-07-23 13:55 ` [PATCH v2 3/3] md/raid10: skip clean regions in bulk during recovery Yunye Zhao
2026-07-23 14:16 ` sashiko-bot
2026-07-31 9:46 ` yu kuai
2026-08-04 3:55 ` Yunye Zhao [this message]
2026-08-04 6:57 ` yu kuai
2026-08-04 9:01 ` Yunye Zhao
2026-08-04 11:47 ` yu kuai
2026-08-07 9:05 ` Yunye Zhao
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=20260804035516.98652-1-yunye.zhao@linux.alibaba.com \
--to=yunye.zhao@linux.alibaba.com \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=magiclinan@didiglobal.com \
--cc=sashiko-bot@kernel.org \
--cc=song@kernel.org \
--cc=xiao@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