From nobody Mon Feb 9 13:39:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599136113; cv=none; d=zohomail.com; s=zohoarc; b=UkIHFm90y+WaM3ef0E2vk5WhfV3wBrMUMPeeddBeXYXdrbg8B4v210M9y2IwLXHN8hNnbAEcyifm25JWKfISYoFSjpPfT9NSuqT+OUOV1q5CmEaVIArtAwv4DA/r70+lag5BcvUX9oww0kCuTqVgNldTdbnClIB4AX5YRp6r0G0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599136113; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HgXwbQUt5qjogYM8iFoeW+GHqjN8VyRP3jjf5JuoDPA=; b=LlpJYlqw/1o2ghKS3J7kvZ9y69Iaq5eEL55lROEbwwcXKLFsnQu2wNFRQvTKDTnA6BRNXMdqUK045+PYgwac/Ox52DPT/S0nPFS3SOQiUyCIyAWXNfIqGVDr8zeOo7Rmt/3o+sBX6DSZuBnxJqZb9ML5HRmlTS9AylEvnUVdvWg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599136112999886.9625833852932; Thu, 3 Sep 2020 05:28:32 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-571-XjKVKWhAPPu3AP0KuFZPIA-1; Thu, 03 Sep 2020 08:28:30 -0400 Received: by mail-wr1-f69.google.com with SMTP id y3so1009750wrl.21 for ; Thu, 03 Sep 2020 05:28:30 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (50.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.50]) by smtp.gmail.com with ESMTPSA id o4sm4079738wrv.86.2020.09.03.05.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 05:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599136112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HgXwbQUt5qjogYM8iFoeW+GHqjN8VyRP3jjf5JuoDPA=; b=ZttGjjjCS3616krHaedR7CdgJC7MYFY6oKjVwhQwCU4y1QLwkhf9il9wSpTIUM38oWncs7 7dgEIjCRIQ0dnAo6J93s7PDSmxOjUw8UpJGmBWWPdBWdevC/nL0wby0ctPFHkZaIAZJKcL 7jyHUrPV/qJiqt8DnGNTkS1RVIPkAzM= X-MC-Unique: XjKVKWhAPPu3AP0KuFZPIA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HgXwbQUt5qjogYM8iFoeW+GHqjN8VyRP3jjf5JuoDPA=; b=NR0x5dhlk8q2lNYyzE6lKYUHCjU+/RuKkZRZiVPB78HGYSn1sx53PVzWPJtO47HWJD ihrvVUFJwD4vICVUBhs7zHbj1FRdQ/BPJB20RboGXpn+6NAzVwkMw4Esu+Vrec/568cC bxLhWaN57Km7ECUI/me4erFA5zM3Ce2s2sZ0d7rZd/AK6vTmTWJ3rGiG/ux1AdAGqR9F phywBm2wiMKus6ZVleVhASKxqa3ZS4zCPY5B2X7IK0FVIUIaOfXGggUFx6PHK2ZBGaBM P7LDYbAJXJm/mqNb/vvsH2aH+qkV9S37OF7tehxFLiuglmHBs560P5Lhu0UpvMRQTMRd 7Duw== X-Gm-Message-State: AOAM532dVoxNz3w2F6F+51SZaLVZfpoZh+QVOpChTWluzNhirDF2Gz1t Fbysftfjn/VpGdueeCwxW5q/XxDIUz3qWcGepdOaMr7h1WKdormDkFruJ4FbTlKeb11jOJQhhy4 clegFaqY1Vt0r1g== X-Received: by 2002:a05:600c:2f8f:: with SMTP id t15mr2339266wmn.41.1599136109719; Thu, 03 Sep 2020 05:28:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmj/53RnlUwP41Kw830eyDzS+S/LEAKExFitdifMhLbzQYjgIiwMnMt/JKVg31cWPCejhtNg== X-Received: by 2002:a05:600c:2f8f:: with SMTP id t15mr2339246wmn.41.1599136109515; Thu, 03 Sep 2020 05:28:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Klaus Jensen , Fam Zheng , Max Reitz , Keith Busch , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , Stefano Garzarella Subject: [PATCH v7 05/15] block/nvme: Improve error message when IO queue creation failed Date: Thu, 3 Sep 2020 14:27:53 +0200 Message-Id: <20200903122803.405265-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200903122803.405265-1-philmd@redhat.com> References: <20200903122803.405265-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Do not use the same error message for different failures. Display a different error whether it is the CQ or the SQ. Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 488d4ddb3b8..91dba4ec5db 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -648,7 +648,7 @@ static bool nvme_add_io_queue(BlockDriverState *bs, Err= or **errp) .cdw11 =3D cpu_to_le32(0x3), }; if (nvme_cmd_sync(bs, s->queues[INDEX_ADMIN], &cmd)) { - error_setg(errp, "Failed to create io queue [%d]", n); + error_setg(errp, "Failed to create CQ io queue [%d]", n); nvme_free_queue_pair(q); return false; } @@ -659,7 +659,7 @@ static bool nvme_add_io_queue(BlockDriverState *bs, Err= or **errp) .cdw11 =3D cpu_to_le32(0x1 | (n << 16)), }; if (nvme_cmd_sync(bs, s->queues[INDEX_ADMIN], &cmd)) { - error_setg(errp, "Failed to create io queue [%d]", n); + error_setg(errp, "Failed to create SQ io queue [%d]", n); nvme_free_queue_pair(q); return false; } --=20 2.26.2