diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-03-03 14:47:17 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-03-11 11:48:34 +0100 |
commit | e6ad55988b968bd4c54fd182d0bd3d7fcb969779 (patch) | |
tree | 47a6f784f85186f59b837a0012d943556042e246 /drivers/nvme | |
parent | df66617bfe87487190a60783d26175b65d2502ce (diff) |
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/zns.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c index c7e3ec561ba0..bc2f344f0ae0 100644 --- a/drivers/nvme/host/zns.c +++ b/drivers/nvme/host/zns.c @@ -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; |