[PATCH 4/5] md: use sector_t for recovery_active in status_resync()

From: Hiroshi Nishida

Date: Wed Jun 24 2026 - 11:55:46 EST


recovery_active holds a sector count read from the sector-typed atomic
mddev->recovery_active and is then combined with the sector_t values
curr_mark_cnt and resync_mark_cnt. Declaring it as a plain int needlessly
narrows it and mixes signedness into sector_t arithmetic; declare it
sector_t to match.

No functional change.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Hiroshi Nishida <nishidafmly@xxxxxxxxx>
---
drivers/md/md.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 829b4a3f545b..0cd85cc92ed3 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8816,8 +8816,8 @@ static int status_resync(struct seq_file *seq, struct mddev *mddev)
{
sector_t max_sectors, resync, res;
unsigned long dt, db = 0;
- sector_t rt, curr_mark_cnt, resync_mark_cnt;
- int scale, recovery_active;
+ sector_t rt, curr_mark_cnt, resync_mark_cnt, recovery_active;
+ int scale;
unsigned int per_milli;

if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
--
2.43.0