Skip to content

Commit 0551ec9

Browse files
Christoph Hellwigkeithbusch
authored andcommitted
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: 46e7422 ("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>
1 parent c85c9ab commit 0551ec9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
20892089
if (id->ncap == 0) {
20902090
/* namespace not allocated or attached */
20912091
info->is_removed = true;
2092-
ret = -ENODEV;
2092+
ret = -ENXIO;
20932093
goto out;
20942094
}
20952095
lbaf = nvme_lbaf_index(id->flbas);

0 commit comments

Comments
 (0)