Commit e6ad5598 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig

nvme: set max_zone_append_sectors nvme_revalidate_zones

The chunk_sectors value affects max_zone_append_sectors.
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Tested-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent df66617b
......@@ -9,7 +9,13 @@
int nvme_revalidate_zones(struct nvme_ns *ns)
{
return blk_revalidate_disk_zones(ns->disk, NULL);
struct request_queue *q = ns->queue;
int ret;
ret = blk_revalidate_disk_zones(ns->disk, NULL);
if (!ret)
blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append);
return ret;
}
static int nvme_set_max_append(struct nvme_ctrl *ctrl)
......@@ -107,7 +113,6 @@ int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf)
blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
blk_queue_max_open_zones(q, le32_to_cpu(id->mor) + 1);
blk_queue_max_active_zones(q, le32_to_cpu(id->mar) + 1);
blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append);
free_data:
kfree(id);
return status;
......
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