Subject: linux-next: manual merge of the device-mapper tree with the block tree

From: Stephen Rothwell <[email-masked]>
Date: Fri, 18 Jul 2025 15:10:45 +1000

Hi all,

Today's linux-next merge of the device-mapper tree got a conflict in:

  drivers/md/dm-stripe.c

between commit:

  5fb9d4341b78 ("dm-stripe: limit chunk_sectors to the stripe size")

from the block tree and commit:

  846e9e999dd3 ("dm-stripe: fix a possible integer overflow")

from the device-mapper tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/md/dm-stripe.c
index 58902091bf79,984f53a42bf0..000000000000
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@@ -456,11 -456,13 +456,14 @@@ static void stripe_io_hints(struct dm_t
  			    struct queue_limits *limits)
  {
  	struct stripe_c *sc = ti->private;
- 	unsigned int chunk_size = sc->chunk_size << SECTOR_SHIFT;
+ 	unsigned int io_min, io_opt;
  
- 	limits->chunk_sectors = sc->chunk_size;
- 	limits->io_min = chunk_size;
- 	limits->io_opt = chunk_size * sc->stripes;
+ 	if (!check_shl_overflow(sc->chunk_size, SECTOR_SHIFT, &io_min) &&
+ 	    !check_mul_overflow(io_min, sc->stripes, &io_opt)) {
++		limits->chunk_sectors = sc->chunk_size;
+ 		limits->io_min = io_min;
+ 		limits->io_opt = io_opt;
+ 	}
  }
  
  static struct target_type stripe_target = {