aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2021-04-08 13:46:03 +0200
committerKlaus Jensen <k.jensen@samsung.com>2021-04-12 08:55:23 +0200
commit5cefe2870874e6442eba62408bedbb4338b183a3 (patch)
tree31ff7dda672d431c9e0c58d6a20624162d5e8645
parentd357230b20e5f238e5ff6084cdf6d3231d27f0c6 (diff)
downloadqemu-arm-5cefe2870874e6442eba62408bedbb4338b183a3.tar.gz
hw/block/nvme: store aiocb in compare
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>
-rw-r--r--hw/block/nvme.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 86336152a3..65bb2cfc21 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;
}