From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 978EEC433DB for ; Thu, 11 Feb 2021 12:42:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A822764E2E for ; Thu, 11 Feb 2021 12:42:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A822764E2E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lABIn-0001ml-PW for qemu-devel@archiver.kernel.org; Thu, 11 Feb 2021 07:42:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lABBa-0003OJ-4i; Thu, 11 Feb 2021 07:35:06 -0500 Received: from mail.csgraf.de ([85.25.223.15]:41068 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lABBX-0006o5-NC; Thu, 11 Feb 2021 07:35:05 -0500 Received: from Alexanders-Mac-mini.local (unknown [188.138.100.120]) by csgraf.de (Postfix) with UTF8SMTPSA id 65A406080F85; Thu, 11 Feb 2021 13:35:00 +0100 (CET) Message-ID: <280b4e29-1337-dac7-071c-1feeab182294@csgraf.de> Date: Thu, 11 Feb 2021 13:34:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Thunderbird/86.0 Subject: Re: [PATCH] hw/block/nvme: fix legacy namespace registration Content-Language: en-US To: Klaus Jensen , qemu-devel@nongnu.org References: <20210211105451.937713-1-its@irrelevant.dk> From: Alexander Graf In-Reply-To: <20210211105451.937713-1-its@irrelevant.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=85.25.223.15; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.119, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Minwoo Im , Keith Busch Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 11.02.21 11:54, Klaus Jensen wrote: > From: Klaus Jensen > > 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 > Cc: Minwoo Im > Signed-off-by: Klaus Jensen 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 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; > + } > } > } >