nvme: add a nvme_ns_head_multipath helper
authorMinwoo Im <minwoo.im.dev@gmail.com>
Wed, 7 Apr 2021 15:49:29 +0000 (17:49 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Apr 2021 06:12:54 +0000 (08:12 +0200)
commit3089738868b665ecc25e7f36e004c073883c16a0
treefc950d8d4ccc25964201625ab17a2f713740d6fe
parent95d54bd1a4c1873aa0e2d4c09966f37954c32b80
nvme: add a nvme_ns_head_multipath helper

Move the multipath gendisk out of #ifdef CONFIG_NVME_MULTIPATH and add
a new nvme_ns_head_multipath that uses it to check if a ns_head has
a multipath device associated with it.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
[hch: added the IS_ENABLED, converted a few existing users]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Javier González <javier.gonz@samsung.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h