hw/block/nvme: store aiocb in compare
nvme_compare() fails to store the aiocb from the blk_aio_preadv() call.
Fix this.
Fixes: 0a384f923f
("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>
This commit is contained in:
parent
d357230b20
commit
5cefe28708
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user