diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2016-10-27 16:29:13 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2016-10-27 16:29:13 -0400 |
commit | 99868af3d0a75cf6a515a9aa81bf0d7bcb39eadb (patch) | |
tree | d5763d2625f5f74ecd5e750b76c5017ce67d39eb /hw/block | |
parent | 835f3d24b42fcbeca5c49048994a4e5d0fe905c5 (diff) |
dma-helpers: explicitly pass alignment into DMA helpers
The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not
necessarily the case for all platforms. Use this as the default alignment for
all current callers.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Message-id: 1476445266-27503-2-git-send-email-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/nvme.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index cef3bb42f1..b380142028 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -258,8 +258,10 @@ static uint16_t nvme_rw(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, req->has_sg = true; dma_acct_start(n->conf.blk, &req->acct, &req->qsg, acct); req->aiocb = is_write ? - dma_blk_write(n->conf.blk, &req->qsg, data_offset, nvme_rw_cb, req) : - dma_blk_read(n->conf.blk, &req->qsg, data_offset, nvme_rw_cb, req); + dma_blk_write(n->conf.blk, &req->qsg, data_offset, BDRV_SECTOR_SIZE, + nvme_rw_cb, req) : + dma_blk_read(n->conf.blk, &req->qsg, data_offset, BDRV_SECTOR_SIZE, + nvme_rw_cb, req); return NVME_NO_COMPLETE; } |