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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 8A7DFC433ED for ; Thu, 8 Apr 2021 19:41:21 +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 C84B160FF1 for ; Thu, 8 Apr 2021 19:41:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C84B160FF1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=irrelevant.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUaWl-0002qx-F9 for qemu-devel@archiver.kernel.org; Thu, 08 Apr 2021 15:41:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUaSu-0001WY-41; Thu, 08 Apr 2021 15:37:20 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUaSr-0004hj-E8; Thu, 08 Apr 2021 15:37:19 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AC5C05C0069; Thu, 8 Apr 2021 15:37:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 08 Apr 2021 15:37:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=+dJNjl2llgVUS+I1mrTb1Spx6C fe8NsqxYmQ243Wchw=; b=0/+/Rp3buM+ihVlJivrzo1hUK+mSKimuS09h/dPGxG fEE5bq1yGY7LI4oMkFVJWpChQtg9aa9auc44i67ZwNXmCJvi2AV/QIvsBJfj2oFp tZ1gTwsNXucWns9QVY04//BZz53p9hw7IGMMSccsx3tu9j+jhGafFvvJIo7y4tNW m8WH+YOkSqE5svZKvV6Vc352OGE7Wv616AQVtF9Z6kK67IroRDmQfRbbSa3Rvlna +dNiJA0XbO+LQCWbPnTIyO/J4i4TUB+vOxuaNzzLNFNt2/j6aSCHodtIfUccu46k N3ZMQ71CxO7l/fpD3fXtU+8rFpJg07ntkKhIKffFLjug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+dJNjl2llgVUS+I1m rTb1Spx6Cfe8NsqxYmQ243Wchw=; b=Q9gnot51igJ3aewW8gaQ7I7M3pRZ8CV0K 46nDzmvwqwDakMngvNa0IstdfGF0aOOyndPkahwTZe59zBSMXxMYmf6AIUMUgrNk mg8GK92RFBKP+U1asHDbfFPmRO+YpzaTwVJEGEVxMrBpJ9ujT8g9BsX3tQxEaa3E wzKa5Mpfj5yjPQkws75DRKmpM92WegSuTPxPoBpfdyqU+NSHGTY9ri6GVogqVrvL AYmnSUw9Eg1NqIOqftFmF9PcJV709VYG7oPameTPuVUDoISlwV8NNO9QkTZUhnP/ oG+na6lpqT0ASPycLgGlaygN+Y3bEgRH5GN8qJoK6komoTSF7f9JQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejledgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhepfeevledvieekudeuffetgeegfeehvdffffejueeuleduhedvgeejveejhfdtteeh necukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 74BAB24005C; Thu, 8 Apr 2021 15:37:11 -0400 (EDT) From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/block/nvme: store aiocb in compare Date: Thu, 8 Apr 2021 21:37:08 +0200 Message-Id: <20210408193709.435939-1-its@irrelevant.dk> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.27; envelope-from=its@irrelevant.dk; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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 , qemu-block@nongnu.org, Klaus Jensen , Gollu Appalanaidu , Max Reitz , Klaus Jensen , Keith Busch Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Klaus Jensen nvme_compare() fails to store the aiocb from the blk_aio_preadv() call. Fix this. Fixes: 0a384f923f51 ("hw/block/nvme: add compare command") Cc: Gollu Appalanaidu Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 6b1f056a0ebc..94bc373260be 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -2837,7 +2837,8 @@ static uint16_t nvme_compare(NvmeCtrl *n, NvmeRequest *req) block_acct_start(blk_get_stats(blk), &req->acct, data_len, BLOCK_ACCT_READ); - blk_aio_preadv(blk, offset, &ctx->data.iov, 0, nvme_compare_data_cb, req); + req->aiocb = blk_aio_preadv(blk, offset, &ctx->data.iov, 0, + nvme_compare_data_cb, req); return NVME_NO_COMPLETE; } -- 2.31.1