]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaa7628e0ad91718a5019a5df46bb1dd4e569f4d5
treef4515f425310f26cd20d5a62a02456dacada890d
parentd931d267dd945288ea3aebae5e5c698ea9c121cc
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