[PATCH 0/2] md: widen size/count types for large arrays

From: Hiroshi Nishida

Date: Fri Jul 10 2026 - 09:24:11 EST


Two small type-widening fixes for large arrays. Neither changes
behaviour or memory use on any current configuration.

1/2 changes chunk_sectors and the stripe-cache count fields to unsigned
int, matching how they are used and avoiding implicit sign
extension in the cache shrinker's subtraction.

2/2 widens the badblocks sector parameters from int to sector_t so the
helpers do not narrow a sector_t argument on very large devices.

These are independent of the other md/raid5 patches I'm sending and can
be applied on their own.

Hiroshi Nishida (2):
md: change chunk_sectors and stripe cache counts to unsigned int
md: widen badblock sectors param from int to sector_t

drivers/md/md.c | 4 ++--
drivers/md/md.h | 10 +++++-----
drivers/md/raid5.c | 14 +++++++-------
drivers/md/raid5.h | 8 ++++----
4 files changed, 18 insertions(+), 18 deletions(-)


base-commit: 55b77337bdd088c77461588e5ec094421b89911b
--
2.43.0