Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: Clear zone limits for a non-zoned stacked queue

Device mapper may create a non-zoned mapped device out of a zoned device
(e.g., the dm-zoned target). In such case, some queue limit such as the
max_zone_append_sectors and zone_write_granularity endup being non zero
values for a block device that is not zoned. Avoid this by clearing
these limits in blk_stack_limits() when the stacked zoned limit is
false.

Fixes: 3093a479727b ("block: inherit the zoned characteristics in blk_stack_limits")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240222131724.1803520-1-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Damien Le Moal and committed by
Jens Axboe
c8f6f88d 0f225f87

+4
+4
block/blk-settings.c
··· 865 865 t->zone_write_granularity = max(t->zone_write_granularity, 866 866 b->zone_write_granularity); 867 867 t->zoned = max(t->zoned, b->zoned); 868 + if (!t->zoned) { 869 + t->zone_write_granularity = 0; 870 + t->max_zone_append_sectors = 0; 871 + } 868 872 return ret; 869 873 } 870 874 EXPORT_SYMBOL(blk_stack_limits);