summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-20 08:12:49 +0200
committerJens Axboe <axboe@kernel.dk>2020-07-20 15:38:52 -0600
commit3093a479727be194996dbc40f803711af5877be4 (patch)
tree7b85597ee0028fc4cc5962eb416f21a09da39f90 /block
parent4f43d648078a754aefe6a4de233ebb6e4d192aa6 (diff)
downloadlinux-stable-3093a479727be194996dbc40f803711af5877be4.tar.gz
linux-stable-3093a479727be194996dbc40f803711af5877be4.tar.bz2
linux-stable-3093a479727be194996dbc40f803711af5877be4.zip
block: inherit the zoned characteristics in blk_stack_limits
Lift the code from device mapper into blk_stack_limits to inherity the stacking limitations. This ensures we do the right thing for all stacked zoned block devices. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Tested-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-settings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 9a2c23cd9700..9cddbd736474 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -609,6 +609,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
t->chunk_sectors = min_not_zero(t->chunk_sectors,
b->chunk_sectors);
+ t->zoned = max(t->zoned, b->zoned);
return ret;
}
EXPORT_SYMBOL(blk_stack_limits);