forked from Minki/linux
nvme: set max_zone_append_sectors nvme_revalidate_zones
The chunk_sectors value affects max_zone_append_sectors. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Tested-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
df66617bfe
commit
e6ad55988b
@ -9,7 +9,13 @@
|
|||||||
|
|
||||||
int nvme_revalidate_zones(struct nvme_ns *ns)
|
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)
|
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_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
|
||||||
blk_queue_max_open_zones(q, le32_to_cpu(id->mor) + 1);
|
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_active_zones(q, le32_to_cpu(id->mar) + 1);
|
||||||
blk_queue_max_zone_append_sectors(q, ns->ctrl->max_zone_append);
|
|
||||||
free_data:
|
free_data:
|
||||||
kfree(id);
|
kfree(id);
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user