aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorBenoît Canet <benoit.canet@nodalink.com>2014-09-05 15:46:17 +0200
committerKevin Wolf <kwolf@redhat.com>2014-09-10 10:41:29 +0200
commit28298fd3d9df6685c069fa0d03398c8c585a83ea (patch)
tree4e5c76ee1d4670c760852ab78ff5b90c1fcc17a1 /hw/block
parent5e5a94b60518002e8ecc7afa78a9e7565b23e38f (diff)
block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_
The middle term goal is to move the BlockAcctStats structure in the device models. (Capturing I/O accounting statistics in the device models is good for billing) This patch make a small step in this direction by removing a reference to BDRV. CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Keith Busch <keith.busch@intel.com> CC: Anthony Liguori <aliguori@amazon.com> CC: "Michael S. Tsirkin" <mst@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: John Snow <jsnow@redhat.com> CC: Richard Henderson <rth@twiddle.net> CC: Markus Armbruster <armbru@redhat.com> CC: Alexander Graf <agraf@suse.de>i Signed-off-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nvme.c2
-rw-r--r--hw/block/virtio-blk.c6
-rw-r--r--hw/block/xen_disk.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 04459e583c..f9aec24f26 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -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);
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index a7f28275f4..c2cb815a98 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -279,7 +279,7 @@ void virtio_submit_multiwrite(BlockDriverState *bs, MultiReqBuffer *mrb)
static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb)
{
- bdrv_acct_start(req->dev->bs, &req->acct, 0, BDRV_ACCT_FLUSH);
+ bdrv_acct_start(req->dev->bs, &req->acct, 0, BLOCK_ACCT_FLUSH);
/*
* Make sure all outstanding writes are posted to the backing device.
@@ -322,7 +322,7 @@ static void virtio_blk_handle_write(VirtIOBlockReq *req, MultiReqBuffer *mrb)
return;
}
- bdrv_acct_start(req->dev->bs, &req->acct, req->qiov.size, BDRV_ACCT_WRITE);
+ bdrv_acct_start(req->dev->bs, &req->acct, req->qiov.size, BLOCK_ACCT_WRITE);
if (mrb->num_writes == 32) {
virtio_submit_multiwrite(req->dev->bs, mrb);
@@ -353,7 +353,7 @@ static void virtio_blk_handle_read(VirtIOBlockReq *req)
return;
}
- bdrv_acct_start(req->dev->bs, &req->acct, req->qiov.size, BDRV_ACCT_READ);
+ bdrv_acct_start(req->dev->bs, &req->acct, req->qiov.size, BLOCK_ACCT_READ);
bdrv_aio_readv(req->dev->bs, sector, &req->qiov,
req->qiov.size / BDRV_SECTOR_SIZE,
virtio_blk_rw_complete, req);
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 2dcef07793..bf7af9e95f 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -518,7 +518,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
switch (ioreq->req.operation) {
case BLKIF_OP_READ:
- bdrv_acct_start(blkdev->bs, &ioreq->acct, ioreq->v.size, BDRV_ACCT_READ);
+ bdrv_acct_start(blkdev->bs, &ioreq->acct, ioreq->v.size,
+ BLOCK_ACCT_READ);
ioreq->aio_inflight++;
bdrv_aio_readv(blkdev->bs, ioreq->start / BLOCK_SIZE,
&ioreq->v, ioreq->v.size / BLOCK_SIZE,
@@ -530,7 +531,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
break;
}
- bdrv_acct_start(blkdev->bs, &ioreq->acct, ioreq->v.size, BDRV_ACCT_WRITE);
+ bdrv_acct_start(blkdev->bs, &ioreq->acct, ioreq->v.size,
+ BLOCK_ACCT_WRITE);
ioreq->aio_inflight++;
bdrv_aio_writev(blkdev->bs, ioreq->start / BLOCK_SIZE,
&ioreq->v, ioreq->v.size / BLOCK_SIZE,