From: "Li Youhong" <dayou5941@163.com>
To: song@kernel.org, yukuai@fygo.io
Cc: magiclinan@didiglobal.com, xiao@kernel.org,
linux-raid@vger.kernel.org, Li Youhong <liyouhong@kylinos.cn>
Subject: [PATCH 0/3] md: raid helper cleanups
Date: Thu, 27 Aug 2026 15:56:17 +0800 [thread overview]
Message-ID: <20260827075620.3599227-1-dayou5941@163.com> (raw)
From: Li Youhong <liyouhong@kylinos.cn>
This series factors a few repeated md/raid patterns into small helpers.
There is no intentional behaviour change; each patch is a mechanical
extract of existing logic.
Patch 1 adds rdev_record_write_error() in md.h for the
WriteErrorSeen + WantReplacement + MD_RECOVERY_NEEDED sequence shared by
raid1, raid10 and raid5.
Patches 2 and 3 move raid1/raid10-only helpers into raid1-10.c, which is
#included by both drivers:
- rdev_bb_block_sectors() for the badblocks-aligned block size used in
narrow_write_error()
- flush_bio_list() for the bitmap plug flush path previously duplicated
in raid10's flush_pending_writes() and raid10_unplug()
The helpers in raid1-10.c follow the existing static inline convention
used by raid1_submit_write(), check_decay_read_errors(), and others in
that file.
Li Youhong (3):
md: add rdev_record_write_error() helper
md/raid1-10: add rdev_bb_block_sectors() helper
md/raid1-10: share flush_bio_list between raid1 and raid10
---
drivers/md/md.h | 7 +++++++
drivers/md/raid1-10.c | 27 +++++++++++++++++++++++++++
drivers/md/raid1.c | 42 +++++++-----------------------------------
drivers/md/raid10.c | 50 +++++++-------------------------------------------
drivers/md/raid5.c | 5 +----
5 files changed, 48 insertions(+), 83 deletions(-)
next reply other threads:[~2026-08-27 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 7:56 Li Youhong [this message]
2026-08-27 7:56 ` [PATCH 1/3] md: add rdev_record_write_error() helper Li Youhong
2026-08-27 7:56 ` [PATCH 2/3] md/raid1-10: add rdev_bb_block_sectors() helper Li Youhong
2026-08-27 8:15 ` sashiko-bot
2026-08-27 7:56 ` [PATCH 3/3] md/raid1-10: share flush_bio_list between raid1 and raid10 Li Youhong
2026-09-05 2:43 ` [PATCH 0/3] md: raid helper cleanups yu kuai
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=20260827075620.3599227-1-dayou5941@163.com \
--to=dayou5941@163.com \
--cc=linux-raid@vger.kernel.org \
--cc=liyouhong@kylinos.cn \
--cc=magiclinan@didiglobal.com \
--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