diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-02-11 11:50:19 +0100 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-02-11 14:11:17 +0100 |
commit | 886188a9c11ff9518c8f20e265e7a98439c14d32 (patch) | |
tree | 0e476a221c9ac2f094acb7f6289dfde1f7b0b9e9 | |
parent | 83339e21d05c824ebc9131d644f25c23d0e41ecf (diff) | |
download | qemu-886188a9c11ff9518c8f20e265e7a98439c14d32.zip qemu-886188a9c11ff9518c8f20e265e7a98439c14d32.tar.gz qemu-886188a9c11ff9518c8f20e265e7a98439c14d32.tar.bz2 |
hw/block/nvme: fix legacy namespace registration
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>
Tested-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
-rw-r--r-- | hw/block/nvme.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5ce21b7..02390f1 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -4507,6 +4507,10 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) if (nvme_ns_setup(ns, errp)) { return; } + + if (nvme_register_namespace(n, ns, errp)) { + return; + } } } |