]> www.infradead.org Git - nvme.git/commit
nvme: don't create a multipath node for zero capacity devices
authorChristoph Hellwig <hch@lst.de>
Wed, 3 Apr 2024 12:47:17 +0000 (14:47 +0200)
committerKeith Busch <kbusch@kernel.org>
Thu, 4 Apr 2024 15:33:15 +0000 (08:33 -0700)
commit0551ec93a00d935efd86b45bf70cefdc4e515b65
treed4571e78ce2b98bba98e2b3d714e4f44660fd5a3
parentc85c9ab926a592e2f59f7d9a6ca7d6562843d8fa
nvme: don't create a multipath node for zero capacity devices

Apparently there are nvme controllers around that report namespaces
in the namespace list which have zero capacity.  Return -ENXIO instead
of -ENODEV from nvme_update_ns_info_block so we don't create a hidden
multipath node for these namespaces but entirely ignore them.

Fixes: 46e7422cda84 ("nvme: move common logic into nvme_update_ns_info")
Reported-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Nilay Shroff <nilay@linux.ibm.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c