aboutsummaryrefslogtreecommitdiff
path: root/hw/block/nvme.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-09-15 17:35:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-09-15 17:35:22 +0100
commitf2bcdc8de018d33ecf93da7a94f327956ecf76ea (patch)
tree6f5d4706132e29c5c95b8a829e6eb335c9657166 /hw/block/nvme.c
parent16ab5046c4a607dddabc8086d4454293af59fc9f (diff)
parent0e4271b711a8ea766d29824c844e268b91ac3ae5 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block patches # gpg: Signature made Fri 12 Sep 2014 16:09:43 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (22 commits) qcow2: Add falloc and full preallocation option raw-posix: Add falloc and full preallocation option qapi: introduce PreallocMode and new PreallocModes full and falloc. block: don't convert file size to sector size block: round up file size to nearest sector iotests: Send the correct fd in socket_scm_helper blockdev: Refuse to drive_del something added with blockdev-add block: extend BLOCK_IO_ERROR with reason string dataplane: fix virtio_blk_data_plane_create() op blocker error path qemu-iotests: Run 025 for Archipelago block driver block/archipelago: Implement bdrv_truncate() block: Make the block accounting functions operate on BlockAcctStats block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_ block: Extract the block accounting code block: Extract the BlockAcctStats structure IDE: MMIO IDE device control should be little endian thread-pool: Drop unnecessary includes xen: Drop redundant bdrv_close() from pci_piix3_xen_ide_unplug() xen_disk: Plug memory leak on error path qemu-io: Clean up openfile() after commit 2e40134 ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/block/nvme.c')
-rw-r--r--hw/block/nvme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 04459e583c..b010c9b00f 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -197,7 +197,7 @@ static void nvme_rw_cb(void *opaque, int ret)
NvmeCtrl *n = sq->ctrl;
NvmeCQueue *cq = n->cq[sq->cqid];
- bdrv_acct_done(n->conf.bs, &req->acct);
+ block_acct_done(bdrv_get_stats(n->conf.bs), &req->acct);
if (!ret) {
req->status = NVME_SUCCESS;
} else {
@@ -232,7 +232,7 @@ static uint16_t nvme_rw(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd,
assert((nlb << data_shift) == req->qsg.size);
dma_acct_start(n->conf.bs, &req->acct, &req->qsg, is_write ?
- BDRV_ACCT_WRITE : BDRV_ACCT_READ);
+ BLOCK_ACCT_WRITE : BLOCK_ACCT_READ);
req->aiocb = is_write ?
dma_bdrv_write(n->conf.bs, &req->qsg, aio_slba, nvme_rw_cb, req) :
dma_bdrv_read(n->conf.bs, &req->qsg, aio_slba, nvme_rw_cb, req);