qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
	Gollu Appalanaidu <anaidu.gollu@samsung.com>,
	Max Reitz <mreitz@redhat.com>, Keith Busch <kbusch@kernel.org>,
	Minwoo Im <minwoo.im.dev@gmail.com>,
	Klaus Jensen <its@irrelevant.dk>
Subject: [PULL for-6.0 3/4] hw/block/nvme: store aiocb in compare
Date: Mon, 12 Apr 2021 09:01:40 +0200	[thread overview]
Message-ID: <20210412070141.521593-4-its@irrelevant.dk> (raw)
In-Reply-To: <20210412070141.521593-1-its@irrelevant.dk>

From: Klaus Jensen <k.jensen@samsung.com>

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 <anaidu.gollu@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
---
 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 86336152a378..65bb2cfc21d7 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -2843,7 +2843,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



  parent reply	other threads:[~2021-04-12  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  7:01 [PULL for-6.0 0/4] emulated nvme docs and fixes for -rc3 Klaus Jensen
2021-04-12  7:01 ` [PULL for-6.0 1/4] docs: add nvme emulation documentation Klaus Jensen
2021-04-12  7:01 ` [PULL for-6.0 2/4] hw/block/nvme: map prp fix if prp2 contains non-zero offset Klaus Jensen
2021-04-12  7:01 ` Klaus Jensen [this message]
2021-04-12  7:01 ` [PULL for-6.0 4/4] hw/block/nvme: drain namespaces on sq deletion Klaus Jensen
2021-04-12 11:11 ` [PULL for-6.0 0/4] emulated nvme docs and fixes for -rc3 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210412070141.521593-4-its@irrelevant.dk \
    --to=its@irrelevant.dk \
    --cc=anaidu.gollu@samsung.com \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=minwoo.im.dev@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).