Skip to content

Commit d904d09

Browse files
author
Ming Lei
committed
dm-stripe: limit chunk_sectors to the stripe size
JIRA: https://issues.redhat.com/browse/RHEL-106845 commit 5fb9d43 Author: John Garry <john.g.garry@oracle.com> Date: Fri Jul 11 10:52:57 2025 +0000 dm-stripe: limit chunk_sectors to the stripe size Same as done for raid0, set chunk_sectors limit to appropriately set the atomic write size limit. Setting chunk_sectors limit in this way overrides the stacked limit already calculated based on the bottom device limits. This is ok, as when any bios are sent to the bottom devices, the block layer will still respect the bottom device chunk_sectors. Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20250711105258.3135198-6-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <ming.lei@redhat.com>
1 parent 6772a5d commit d904d09

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm-stripe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ static void stripe_io_hints(struct dm_target *ti,
459459
struct stripe_c *sc = ti->private;
460460
unsigned int chunk_size = sc->chunk_size << SECTOR_SHIFT;
461461

462+
limits->chunk_sectors = sc->chunk_size;
462463
limits->io_min = chunk_size;
463464
limits->io_opt = chunk_size * sc->stripes;
464465
}

0 commit comments

Comments
 (0)