nvme: fix initialization of the zone bitmaps
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Aug 2020 07:31:36 +0000 (09:31 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 05:56:17 +0000 (07:56 +0200)
commit7fad20dd7c0ab1d2c224755a574576be25f13e03
treef4515f425310f26cd20d5a62a02456dacada890d
parent6fcd669514794da08ce6bfa272b6ec9b33cb543d
nvme: fix initialization of the zone bitmaps

The removal of the ->revalidate_disk method broke the initialization of
the zone bitmaps, as nvme_revalidate_disk now never gets called during
initialization.

Move the zone related code from nvme_revalidate_disk into a new helper in
zns.c, and call it from nvme_alloc_ns in addition to nvme_validate_ns to
ensure the zone bitmaps are initialized during probe.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/zns.c