Skip to content

Commit

Permalink
hw/block/nvme: store aiocb in compare
Browse files Browse the repository at this point in the history
nvme_compare() fails to store the aiocb from the blk_aio_preadv() call.
Fix this.

Fixes: 0a384f9 ("hw/block/nvme: add compare command")
Cc: Gollu Appalanaidu <[email protected]>
Signed-off-by: Klaus Jensen <[email protected]>
Reviewed-by: Gollu Appalanaidu <[email protected]>
Reviewed-by: Minwoo Im <[email protected]>
  • Loading branch information
birkelund committed Apr 12, 2021
1 parent d357230 commit 5cefe28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5cefe28

Please sign in to comment.