From: Hiroshi Nishida <nishidafmly@gmail.com>
To: Song Liu <song@kernel.org>, Yu Kuai <yukuai@fygo.io>
Cc: Li Nan <magiclinan@didiglobal.com>, Xiao Ni <xiao@kernel.org>,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
Hiroshi Nishida <nishidafmly@gmail.com>
Subject: [PATCH 1/5] md/raid1,raid10: drop unused mddev arg from check_decay_read_errors()
Date: Wed, 24 Jun 2026 08:54:17 -0700 [thread overview]
Message-ID: <20260624155421.211626-2-nishidafmly@gmail.com> (raw)
In-Reply-To: <20260624155421.211626-1-nishidafmly@gmail.com>
check_decay_read_errors() only ever touches the passed rdev; the mddev
parameter has been unused. Remove it and update the sole caller in
exceed_read_errors().
No functional change.
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Hiroshi Nishida <nishidafmly@gmail.com>
---
drivers/md/raid1-10.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c
index 56a56a4da4f8..edba52eb3116 100644
--- a/drivers/md/raid1-10.c
+++ b/drivers/md/raid1-10.c
@@ -171,7 +171,7 @@ static inline void raid1_prepare_flush_writes(struct mddev *mddev)
* We halve the read error count for every hour that has elapsed
* since the last recorded read error.
*/
-static inline void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev)
+static inline void check_decay_read_errors(struct md_rdev *rdev)
{
long cur_time_mon;
unsigned long hours_since_last;
@@ -206,7 +206,7 @@ static inline bool exceed_read_errors(struct mddev *mddev, struct md_rdev *rdev)
int max_read_errors = atomic_read(&mddev->max_corr_read_errors);
int read_errors;
- check_decay_read_errors(mddev, rdev);
+ check_decay_read_errors(rdev);
read_errors = atomic_inc_return(&rdev->read_errors);
if (read_errors > max_read_errors) {
pr_notice("md/"RAID_1_10_NAME":%s: %pg: Raid device exceeded read_error threshold [cur %d:max %d]\n",
--
2.43.0
next prev parent reply other threads:[~2026-06-24 15:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 15:54 [PATCH 0/5] md: minor cleanups in md core and raid5/raid1/raid10 Hiroshi Nishida
2026-06-24 15:54 ` Hiroshi Nishida [this message]
2026-06-24 15:54 ` [PATCH 2/5] md/raid5: use max() in raid5_calc_degraded() Hiroshi Nishida
2026-06-24 15:54 ` [PATCH 3/5] md: make is_mddev_idle() take a bool init flag Hiroshi Nishida
2026-06-24 15:54 ` [PATCH 4/5] md: use sector_t for recovery_active in status_resync() Hiroshi Nishida
2026-06-24 16:03 ` sashiko-bot
2026-06-24 16:48 ` Hiroshi Nishida
2026-06-24 15:54 ` [PATCH 5/5] md: clarify the resync ETA comment " Hiroshi Nishida
2026-06-24 15:58 ` sashiko-bot
2026-06-24 16:50 ` Hiroshi Nishida
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=20260624155421.211626-2-nishidafmly@gmail.com \
--to=nishidafmly@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--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