qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/block/nvme: fix legacy namespace registration


From: Alexander Graf
Subject: Re: [PATCH] hw/block/nvme: fix legacy namespace registration
Date: Thu, 11 Feb 2021 13:34:56 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Thunderbird/86.0


On 11.02.21 11:54, Klaus Jensen wrote:
From: Klaus Jensen <k.jensen@samsung.com>

Moving namespace registration to the nvme-ns realization function had
the unintended side-effect of breaking legacy namespace registration.
Fix this.

Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace")
Reported-by: Alexander Graf <agraf@csgraf.de>
Cc: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>


I can confirm that this fixes the upstream regression. Thanks a lot. Please work on a way with Peter to pull this into the tree as quickly as possible, so that we maintain a working master branch with NVMe.

Tested-by: Alexander Graf <agraf@csgraf.de>


Thanks!

Alex


---
  hw/block/nvme.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 5ce21b7100b3..d36e14fe13e2 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -4507,6 +4507,12 @@ static void nvme_realize(PCIDevice *pci_dev, Error 
**errp)
          if (nvme_ns_setup(ns, errp)) {
              return;
          }
+
+        if (nvme_register_namespace(n, ns, errp)) {
+            error_propagate_prepend(errp, local_err,
+                                    "could not register namespace: ");
+            return;
+        }
      }
  }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]