]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: cleanup zone information initialization
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 28 Jan 2021 04:47:27 +0000 (13:47 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:44:40 +0000 (07:44 -0700)
commita21cf4b60759b2137c76ac1b8ece7d07608e7d49
tree5d555eec23ce82c95f71a15c7ae310ce49810bfa
parent573fc450f23ad784b154cc29623bc38983d456bf
nvme: cleanup zone information initialization

For a zoned namespace, in nvme_update_ns_info(), call
nvme_update_zone_info() after executing nvme_update_disk_info() so that
the namespace queue logical and physical block size limits are set.
This allows setting the namespace queue max_zone_append_sectors limit
in nvme_update_zone_info() instead of nvme_revalidate_zones(),
simplifying this function. Also use blk_queue_set_zoned() to set the
namespace zoned model.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/zns.c