Skip to content

Commit 5fdb4f8

Browse files
johnpgarrykawasaki
authored andcommitted
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 <[email protected]> Reviewed-by: Mikulas Patocka <[email protected]> Signed-off-by: John Garry <[email protected]>
1 parent edf1cd5 commit 5fdb4f8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/md/dm-stripe.c

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

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

0 commit comments

Comments
 (0)