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;
> + }
> }
> }
>