From 5366d0c8bc2a8bb7a4e58e75c7e457e86d3d56f6 Mon Sep 17 00:00:00 2001 From: Benoît Canet Date: Fri, 5 Sep 2014 15:46:18 +0200 Subject: block: Make the block accounting functions operate on BlockAcctStats This is the next step for decoupling block accounting functions from BlockDriverState. In a future commit the BlockAcctStats structure will be moved from BlockDriverState to the device models structures. Note that bdrv_get_stats was introduced so device models can retrieve the BlockAcctStats structure of a BlockDriverState without being aware of it's layout. This function should go away when BlockAcctStats will be embedded in the device models structures. CC: Kevin Wolf CC: Stefan Hajnoczi CC: Keith Busch CC: Anthony Liguori CC: "Michael S. Tsirkin" CC: Paolo Bonzini CC: Eric Blake CC: Peter Maydell CC: Michael Tokarev CC: John Snow CC: Markus Armbruster CC: Alexander Graf CC: Max Reitz Signed-off-by: Benoît Canet Signed-off-by: Kevin Wolf --- dma-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dma-helpers.c') diff --git a/dma-helpers.c b/dma-helpers.c index 499b52bc5a..f6811fa86b 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -277,5 +277,5 @@ uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg) void dma_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie, QEMUSGList *sg, enum BlockAcctType type) { - bdrv_acct_start(bs, cookie, sg->size, type); + block_acct_start(bdrv_get_stats(bs), cookie, sg->size, type); } -- cgit v1.2.3-55-g7522