From b91d7f73a3b24b2f15e0d87b2ed98216fd9523dc Mon Sep 17 00:00:00 2001 From: wuyankun Date: Wed, 15 Jun 2022 10:53:56 +0800 Subject: [PATCH] nvme:multipath:name the disk name with the nvme_instance_ida. The naming order is consistent with the order in which the pcie device is detected. bugfix: https://gitee.com/openeuler/kernel/issues/I5986O?from=project-issue --- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 267395704a3b..c86ae6a37223 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -67,7 +67,7 @@ void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, ctrl->instance, ns->head->instance); *flags = GENHD_FL_HIDDEN; } else { - sprintf(disk_name, "nvme%dn%d", ctrl->subsys->instance, + sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); } } -- Gitee