Commit eafc63a9 authored by Damien Le Moal's avatar Damien Le Moal Committed by Jens Axboe

block: use blk_queue_set_zoned in add_partition()

When changing the zoned model of host-aware zoned block devices, use
blk_queue_set_zoned() instead of directly assigning the gendisk queue
zoned limit.
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5752dc78
......@@ -334,7 +334,7 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
case BLK_ZONED_HA:
pr_info("%s: disabling host aware zoned block device support due to partitions\n",
disk->disk_name);
disk->queue->limits.zoned = BLK_ZONED_NONE;
blk_queue_set_zoned(disk, BLK_ZONED_NONE);
break;
case BLK_ZONED_NONE:
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment